-
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
Define OTLP -> Prometheus metric name conversion rule #2437
Comments
The official python prometheus client library actually accepts the unit and concatenates it into the metric name. |
Good catch. I think we are required to do this to be compatible with the OpenMetrics spec: It does mean the OTLP -> Prom -> OTLP round-trip is even further from the original name in OTLP, but I think we just have to accept that consequence. Or, it might be possible to trim known unit suffixes in the prometheus receiver. |
@dashpole I noticed the python prometheus client also adds Looks like there was some previous OTel discussion about this for the receiver open-telemetry/opentelemetry-collector#3603, but I don't see anything about this in the datamodel spec right now. |
We should also note that in the datamodel spec. |
I opened a PR to clarify those aspects. LMK if I missed anything else |
What are you trying to achieve?
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/datamodel.md#otlp-metric-points-to-prometheus defined OTLP -> Prometheus metric conversion on instrument type, attributes, exemplars and resource attributes. But the conversion rule for instrument name is missing.
Like, Prometheus defines that instrument units should be concatenated to the metric name. Should this apply in the conversion of OTLP -> Prometheus?
Additional context.
Originally posted by @aabmass open-telemetry/opentelemetry-js#2824 (review)
The text was updated successfully, but these errors were encountered: