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

Clarify that unit must be a suffix for metric names for Prometheus #4057

Merged
merged 3 commits into from
May 24, 2024

Conversation

dashpole
Copy link
Contributor

I found this confusion while reviewing open-telemetry/opentelemetry-dotnet#5646 (comment). The intention is for unit to be added in the same fashion for both OpenMetrics and non-OpenMetrics names.

Before this change, the name seconds_before_my_birthday would not have a unit suffix appended. While this is a conceivable name, it isn't compliant with OpenMetrics, which is the intention of the spec. Instead, it needs to be changed to seconds_before_my_birthday_seconds to be compliant with the OpenMetrics spec.

This change will prevent Exporters from needing to special-case unit handling for OpenMetrics vs non-OpenMetrics.

@open-telemetry/wg-prometheus @reyang @robertcoltheart

@dashpole dashpole requested review from a team May 23, 2024 14:16
@carlosalberto carlosalberto changed the title Clarify that unit must be a suffix for metric names Clarify that unit must be a suffix for metric names for Prometheus May 23, 2024
@dashpole dashpole force-pushed the clarify_unit_location branch from 5071d15 to e8fdae7 Compare May 23, 2024 15:38
@dashpole dashpole force-pushed the clarify_unit_location branch from e8fdae7 to 3dfb383 Compare May 23, 2024 15:39
@reyang
Copy link
Member

reyang commented May 23, 2024

Thanks @dashpole!

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@reyang reyang added the spec:metrics Related to the specification/metrics directory label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants