-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
prometheus exporters: Add add_metric_suffixes configuration option #24260
Merged
dmitryax
merged 2 commits into
open-telemetry:main
from
dashpole:prw_exporter_normalization
Jul 18, 2023
Merged
prometheus exporters: Add add_metric_suffixes configuration option #24260
dmitryax
merged 2 commits into
open-telemetry:main
from
dashpole:prw_exporter_normalization
Jul 18, 2023
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
Looks like I need to update the GMP library before this can move forward. |
dashpole
force-pushed
the
prw_exporter_normalization
branch
2 times, most recently
from
July 13, 2023 18:27
486df2f
to
788f619
Compare
I'll need to follow the deprecation process for BuildPromCompliantName |
dashpole
force-pushed
the
prw_exporter_normalization
branch
from
July 13, 2023 18:39
788f619
to
f36b1a0
Compare
I think it makes sense to keep the feature gate in the exporter since it will be enabled by default, and that change will be breaking for most users |
dmitryax
reviewed
Jul 14, 2023
dashpole
force-pushed
the
prw_exporter_normalization
branch
from
July 14, 2023 17:18
734e086
to
bf81bcf
Compare
dashpole
changed the title
prometheus exporters: Add add_type_and_unit_suffixes configuration option
prometheus exporters: Add add_metric_suffixes configuration option
Jul 14, 2023
dashpole
force-pushed
the
prw_exporter_normalization
branch
from
July 14, 2023 17:20
2ff5490
to
a844b83
Compare
dmitryax
reviewed
Jul 17, 2023
dashpole
force-pushed
the
prw_exporter_normalization
branch
from
July 17, 2023 16:57
f97c8d8
to
d68ba60
Compare
dmitryax
approved these changes
Jul 17, 2023
@dashpole PTAL at the linter failures |
…hich can disable the addition of type and unit suffixes.
dashpole
force-pushed
the
prw_exporter_normalization
branch
from
July 18, 2023 13:38
d68ba60
to
fb3d9c7
Compare
@dmitryax fixed |
dashpole
added
the
ready to merge
Code review completed; ready to merge by maintainers
label
Jul 18, 2023
dmitryax
reviewed
Jul 18, 2023
Co-authored-by: Dmitrii Anoshin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
exporter/prometheus
exporter/prometheusremotewrite
pkg/translator/prometheus
ready to merge
Code review completed; ready to merge by maintainers
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:
Add add_metric_suffixes configuration option, which can disable the addition of type and unit suffixes.
This is backwards-compatible, since the default is true.
This is recommended by the specification for sum suffixes in https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#sums and allowed in metadata
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#metric-metadata-1:
Exporters SHOULD provide a configuration option to disable the addition of _total suffixes.
The resulting unit SHOULD be added to the metric as OpenMetrics UNIT metadata and as a suffix to the metric name unless the metric name already contains the unit, or the unit MUST be omitted
This deprecates the BuildPromCompliantName function in-favor of BuildCompliantName, which includes the additional argument for configuring suffixes.
Link to tracking Issue:
Fixes #21743
Part of #8950
Testing:
Updated tests
Documentation:
Added Documentation.