-
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
Clarify prometheus unit conversions #3066
Conversation
45db292
to
aaa1730
Compare
Actually the description of the translation of Otel to Prometheus metrics is described here for the translator: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/translator/prometheus Side note: when will we enable the |
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.
LGTM
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.
Hi 👋, I came across this PR and added a few comments. Thanks a lot for taking care of this.
aaa1730
to
84628ab
Compare
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.
Looks good. Let's make sure we have Prometheus developers' approval before merging.
8671314
to
676293c
Compare
676293c
to
36723e0
Compare
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
* clarify prometheus unit conversions * don't add unit if it already exists * remove recommendation to convert to base units
Addresses confusion in this comment open-telemetry/opentelemetry-java#4390 (comment) by more completely describing the translation steps required for translating between prometheus unit conventions and opentelemetry unit conventions.
This draws on https://prometheus.io/docs/practices/naming/#base-units and https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#units-and-base-units. It matches the current implementation of the conversion in the collector: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/translator/prometheus/normalize_name.go except that it maintains the current recommendation to convert to base units in Prometheus exporters.
cc @jack-berg @psx95 @jmacd @gouthamve @open-telemetry/wg-prometheus @bertysentry