Skip to content
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 metric names should include unit suffixes. #3288

Closed
dashpole opened this issue Oct 14, 2022 · 0 comments · Fixed by #3352
Closed

Prometheus exporter metric names should include unit suffixes. #3288

dashpole opened this issue Oct 14, 2022 · 0 comments · Fixed by #3352
Assignees
Labels
area:metrics Part of OpenTelemetry Metrics pkg:exporter:prometheus Related to the Prometheus exporter package

Comments

@dashpole
Copy link
Contributor

Spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#metric-metadata-1

The Unit of an OTLP metric point MUST be added as OpenMetrics UNIT metadata. Additionally, the unit MUST be added as a suffix to the metric name, and SHOULD be converted to base units recommended by OpenMetrics when possible. The unit suffix comes before any type-specific suffixes.

The things we need to do are:

  • Map OTel units to "base" units. Base units include seconds, bytes, joules, grams, meters, ratios, volts, amperes, and celsius.
  • Add the unit as a suffix to the metric name.
@dashpole dashpole added area:metrics Part of OpenTelemetry Metrics pkg:exporter:prometheus Related to the Prometheus exporter package labels Oct 14, 2022
@dashpole dashpole added this to the Metric SDK: Beta milestone Oct 14, 2022
@dashpole dashpole self-assigned this Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics pkg:exporter:prometheus Related to the Prometheus exporter package
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants