-
Notifications
You must be signed in to change notification settings - Fork 903
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
Allow metric instrument names to contain /
characters
#3422
Comments
I'm pretty sure the original restriction is to ensure compatibility with Prometheus. If we drop the restriction it could mean our instrument names cannot be converted to Prometheus data. |
Except for the length, right? Might be better to open a separate issue about the 63 character length. |
@aabmass here is my suggestion to move this forward:
|
We already allow I believe someone from OTel was in contact with Prometheus folks about trying to allow additional characters. |
I don't think Prometheus has any length restrictions so collector exporters may already receive such metrics from a Prometheus receiver and probably others. I agree it could break SDK exporters but I'm not aware of any that would run into this issue. We could definitely open it up and provide an option to truncate like we do for attribute value limits. Do you have any specific SDK exporters in mind? |
Nope. I haven't spent time looking into the existing exporters. |
I support increasing the size limit. I worry that like dots, the slash character is not supported by Prometheus and it would be nice to investigate whether there are any technical reasons why Prometheus could not change their character set. In the case of dot, we could not find a technical reason. |
Related: open-telemetry/opentelemetry-dotnet-contrib#740 - .NET emits its own counters with names that don't fit into 63 characters and have to be abbreviated or truncated to meet the limit, which seems quite small and arbitrary. |
I said in the spec meeting I found that Prometheus limited to 255. I was wrong :). What I actually found so far is librato and new relic which limit to 255 https://www.librato.com/docs/kb/faq/best_practices/naming_convention_metrics_tags/ and https://forum.newrelic.com/s/hubtopic/aAX8W0000008XqUWAU/maximum-length-of-a-metric-name |
we have also had problems with the length limit in Java: open-telemetry/opentelemetry-java-instrumentation#6300 |
we continue to get bug reports in Java related to the length restriction: open-telemetry/opentelemetry-java-instrumentation#7448 (comment) |
Update - I've also got folks asking for names that contain |
@lmolkova Counters that exceed that limit are disabled and are usually not exported. |
Discussed again in the SIG today. We couldn't find a strong reason against allowing |
/
characters and exceed 63 characters long/
characters
## Changes Updated the following entry in the spec compliance matrix: * Section Metrics, item "Instrument names conform to the specified syntax." * Language C++ The lastest spec changes (#3648, #3422) are implemented by the following PR: * open-telemetry/opentelemetry-cpp#2281 * open-telemetry/opentelemetry-cpp#2303 so C++ can be marked compliant with the specification.
How about |
@kes2464 can you open a new issue to discuss |
…n-telemetry#3703) ## Changes Updated the following entry in the spec compliance matrix: * Section Metrics, item "Instrument names conform to the specified syntax." * Language C++ The lastest spec changes (open-telemetry#3648, open-telemetry#3422) are implemented by the following PR: * open-telemetry/opentelemetry-cpp#2281 * open-telemetry/opentelemetry-cpp#2303 so C++ can be marked compliant with the specification.
What are you trying to achieve?
Create instruments/metrics with names like
composer.googleapis.com/environment/database/auto_failover_request_count
:/
charactersThese types of metrics are very common in Google Cloud Monitoring (examples, notice the domain prefix is part of the metric) and we would like it to be possible to create such metrics with OTel instrumentation.
What did you expect to see?
It should be possible to create such an instrument e.g. in Python
However it fails with
As required by the spec
Additional context.
Looks like this was introduced in #1557 by @reyang and the oldest reference I could find to these requirements was in #601 by @jmacd.
The text was updated successfully, but these errors were encountered: