forked from helidon-io/helidon
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4,x: Revise MetricsFeature
with new metrics implementation; reorg formatting of output
#2
Open
tjquinno
wants to merge
40
commits into
neutral-metrics-api
Choose a base branch
from
neutral-metrics-api-fix-feature
base: neutral-metrics-api
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s; revise some method signatures; clean up a few things. More to come
…MP metrics so it will build while I work on the neutral metrics API
…Registry, and reworking factory and provider for obtaining a MeterRegistry from the highest-weight implementation. More work needed in the latter at least
…ough these changes will not build
… updates; still WIP--pushing for safe-keeping
…fig from MetricsConfig for use by Micrometer meter registry
…nit tests; some changes triggered by those tests
… interim fix he shared earlier
…atting back; reorg formatting
tjquinno
force-pushed
the
neutral-metrics-api
branch
from
August 18, 2023 12:33
f570cc0
to
a8b1b46
Compare
tjquinno
force-pushed
the
neutral-metrics-api
branch
from
August 31, 2023 15:59
db10c3f
to
9eb9e92
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Continuing work on helidon-io#4868
Resolves helidon-io#7182
This PR works forward from helidon-io#7261.
These changes update some of the basic classes (not drastically) and start the changes to the MetricsFeature to use the new API.
Internal changes in how we format /metrics output
To help keep dependencies cleaner, this PR rearranges how we format metrics output for the /metrics endpoint. The MetricsFeature class, primarily, needs to be able to format the output in arbitrary ways, selected by the media type. To do this without building hard dependencies from the feature module to Micrometer and the Micrometer Prometheus code (and potentially any other formatting approach), this PR introduces a service loader approach for formatting the output.
The feature code now service-loads all MeterRegistryFormatterProvider implementations (the PR includes Micrometer Prometheus and JSON) and then invokes the formatter(MediaType) method on each. If the returned Optional is present then that provider handles that media type and the feature code uses that formatter. Otherwise the feature keeps looking for a provider that does handle the media type. If the feature finds none, then it returns a "406 - not acceptable" status.
Documentation
See helidon-io#7381