-
Notifications
You must be signed in to change notification settings - Fork 893
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: Allow changing metric names by default when translating from Prometheus to OpenTelemetry #3679
Conversation
9f9cdfe
to
5ebe65b
Compare
…rom Prometheus to OpenTelemetry
5ebe65b
to
8e75b83
Compare
@open-telemetry/wg-prometheus @fstab |
Thanks a lot @dashpole. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I have the rights to approve this, but LGTM :)
Would this also open the path for allowing a refactoring of metric names (e.g. implementing a Edit: I see that the wording still explicitly calls out that this is mainly about trimming suffixes. I still wonder if there would be an interest to have metrics that map 1:1 onto OTel semantic conventions translated. |
@pirgeo I think whatever mechanism we land on for mapping prometheus names/labels to OTel names/labels, it should live outside of the prometheus exporters/receivers themselves. I could see schemas potentially solving that problem, as they define a mapping from one naming convention to another. |
…rom Prometheus to OpenTelemetry (open-telemetry#3679)
Changes
The current Prometheus -> OTel spec was written based on the needs of the Prometheus receiver. Prometheus/client_java recently released OTLP support by following the Prometheus -> OTel spec in the java prometheus client.
When the collector tried to trim suffixes by default in the Prometheus receiver (open-telemetry/opentelemetry-collector-contrib#21743), it broke a number of users, which is why the current language requires not changing metric names. However, in cases where OTLP export is "new", such as the java prometheus client, it may be acceptable to remove suffixes by default.
This changes the requirement to not alter metric names by default from a MUST to a SHOULD to make it a recommendation.