-
Notifications
You must be signed in to change notification settings - Fork 818
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 exporter: handle colliding metric attribute keys #5717
Prometheus exporter: handle colliding metric attribute keys #5717
Conversation
5670ae3
to
1dca626
Compare
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Serializer.java
Outdated
Show resolved
Hide resolved
Yes: opentelemetry-java/api/all/src/main/java/io/opentelemetry/api/internal/ImmutableKeyValuePairs.java Lines 46 to 52 in 0e63447
Attributes are always sorted by the keys' string values
|
1dca626
to
fa0a4d5
Compare
Technically that's an implementation detail of a specific |
exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Serializer.java
Outdated
Show resolved
Hide resolved
exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Serializer.java
Outdated
Show resolved
Hide resolved
e777f06
to
4e285dd
Compare
exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Serializer.java
Show resolved
Hide resolved
4e285dd
to
eab524e
Compare
993a8ad
to
92fe87f
Compare
92fe87f
to
c45f333
Compare
@jack-berg is there anything else needed here? |
Thanks @jack-berg! Your additional changes LGTM |
From https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#metric-attributes
This implements the last part of the spec, where values for colliding attributes are concatenated.
Question: are attributes sorted before they are passed to the prometheus exporter?