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

Clarification: metric namespaces are allowed to be metric names #3477

Conversation

trask
Copy link
Member

@trask trask commented May 5, 2023

Related to #3457 (comment)

Note that this is different from attribute namespaces which are not allowed to coincide with attribute names:

Names SHOULD NOT coincide with namespaces. For example if service.instance.id is an attribute name then it is no longer valid to have an attribute named service.instance because service.instance is already a namespace. Because of this rule be careful when choosing names: every existing name prohibits existence of an equally named namespace in the future, and vice versa: any existing namespace prohibits existence of an equally named attribute key in the future.

See alternative proposal (that metric namespaces ARE NOT allowed to be metric names) at #3476

Changes

Clarifies that metric namespaces are allowed to be metric names.

@trask trask force-pushed the clarification-metric-namespaces-are-allowed-to-be-metric-names branch from ce1c327 to 9ae1522 Compare May 5, 2023 18:52
@trask trask marked this pull request as ready for review May 5, 2023 18:55
@trask trask requested review from a team May 5, 2023 18:55
@reyang reyang added the area:semantic-conventions Related to semantic conventions label May 9, 2023
@reyang
Copy link
Member

reyang commented May 9, 2023

@trask heads up - most likely this PR will be closed, and we'll ask you to resubmit the PR in a new repo, please refer to #3474 (comment).

@pirgeo
Copy link
Member

pirgeo commented May 9, 2023

One big upside to this proposal as compared to #3476 is that allowing it for metrics enables us to drop .count suffixes in metric names without "polluting" the attribute key space (since it is okay to have the same namespace). This would help with Prometheus compatibility (#3457) as well as conciseness. Additionally, similar to @jack-berg's comment here (although that thread is unrelated): #3484 (comment), there might be a question about whether certain semantic conventions should be an UpDownCounter or a Gauge. The .count suffix makes it seem like it is always a counter, when it does not have to be (or the use-case would also make sense as a Gauge). Being able to drop the suffix would generally improve the flexibility of the OTel semantic conventions, in my opinion.

Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

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

I'm also in favor of this for the many reasons others pointed in the discussions. I believe preventing "namespaces" to be metrics names themselves would be very limiting.

We anyway have to apply judgment and good sense, because making this explicit now, doesn't mean adding a metric such as process.runtime.jvm is allowed, even though it "complies" with the wording added here. But that's what the review process is for anyway :)

Copy link
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

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

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@trask
Copy link
Member Author

trask commented May 24, 2023

hey all, the @open-telemetry/technical-committee is reviewing this issue, and asked to create a summary of pros/cons. I have created open-telemetry/semantic-conventions#50 based on the comments here, please comment further over there if I missed anything, thx!

@trask trask closed this May 24, 2023
@trask trask deleted the clarification-metric-namespaces-are-allowed-to-be-metric-names branch May 24, 2023 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants