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

Metrics API: instrument name and label name guidelines and limitations #387

Closed
jmacd opened this issue Dec 13, 2019 · 3 comments
Closed
Assignees
Labels
area:api Cross language API specification issue needs discussion Need more information before all suitable labels can be applied release:after-ga Not required before GA release, and not going to work on before GA spec:metrics Related to the specification/metrics directory

Comments

@jmacd
Copy link
Contributor

jmacd commented Dec 13, 2019

Both Prometheus and Dogstatsd specify a set of valid characters for metric names and label names. The OTel specification should include more language in the specification about this sort of limitation.

Prometheus:

https://prometheus.io/docs/practices/naming/

Dogstatsd:

https://docs.datadoghq.com/developers/guide/what-best-practices-are-recommended-for-naming-metrics-and-tags/
https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=metrics
https://docs.datadoghq.com/tagging/

@jmacd jmacd added area:api Cross language API specification issue spec:metrics Related to the specification/metrics directory labels Dec 13, 2019
@jmacd
Copy link
Contributor Author

jmacd commented Dec 18, 2019

Some exporters also restrict labels. For example, Prometheus libraries will panic if you use the label "quantile". We should specify this sort of restriction somewhere.

@reyang reyang added needs discussion Need more information before all suitable labels can be applied release:after-ga Not required before GA release, and not going to work on before GA labels Jul 10, 2020
@jmacd jmacd changed the title Metrics API: instrument name and tag name character set limitations Metrics API: instrument name and label name guidelines and limitations Aug 19, 2020
@jmacd
Copy link
Contributor Author

jmacd commented Aug 19, 2020

This is partly addressed by #807 and #821. It will also be addressed in #504. The only remaining part, why I'm leaving this open, is to extend the guidelines to the naming of metric instruments. I believe the same logic for attribute and label naming applies, but more text will be needed.

@reyang
Copy link
Member

reyang commented May 6, 2021

This should have been resolved by #1578 which has defined the instrument names and also adopted Attributes.
The metrics backend might put more restriction on the attribute name, which could be the details of exporter (for example, key-value-pair fetched from baggage and context will also have such issues if the name won't fit the backend limitation).

@reyang reyang closed this as completed May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Cross language API specification issue needs discussion Need more information before all suitable labels can be applied release:after-ga Not required before GA release, and not going to work on before GA spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

No branches or pull requests

2 participants