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

Agent limits metric name length to 63 #5656

Closed
tomilchik opened this issue Jul 26, 2023 · 4 comments
Closed

Agent limits metric name length to 63 #5656

tomilchik opened this issue Jul 26, 2023 · 4 comments
Labels
Bug Something isn't working

Comments

@tomilchik
Copy link

tomilchik commented Jul 26, 2023

Description
OTEL Agent 1.28.0 applies rule "metric name not to exceed 63 characters" and drops metrics (does not push them to Collector) that break this rule.

Steps to reproduce
Build a Java web app that uses Spring Security 6.*. Attach OTEL Agent v1.24.0+.
Call app's http endpoint (any) to trigger execution of Spring Security filter chain.

What did you expect to see?
No WARN logs from OTEL Agent re: length of metric names

What did you see instead?
Observed: WARN entries in app log similar to this:
[otel.javaagent ] WARN io.opentelemetry.sdk.metrics.internal.InstrumentNameValidator - Instrument name "spring.security.filterchain.WebAsyncManagerIntegrationFilter.after" is invalid, returning noop instrument. Instrument names must consist of 63 or fewer characters including alphanumeric, _, -, -, and start with a letter"

What version and what artifacts are you using?
Artifacts:

  • io.opentelemetry.javaagent:opentelemetry.javaagent:jar:1.28.0. Metrics exporter: otlp
  • org.springframework.boot:spring-boot-starter-security:jar:3.0.5 (pulls transitive Spring Security 6.0.2 dependencies)

How did you reference these artifacts? (excerpt from your build.gradle, pom.xml, etc)
As dependency in pom.xml

Environment
Compiler: java 17.0.6 2023-01-17 LTS
OS: RHEL 8.8
Runtime (if different from JDK above): same as compiler
OS (if different from OS compiled on): same

Additional context
After inet searches - the number 63 looks to come from OTEL spec: https://opentelemetry.io/docs/specs/otel/metrics/api/
So - this might be considered "a feature, not a bug". If that is the case: please count my vote for increasing this number in the OTEL implementation (against the spec); the number is 1)arbitrary, and 2)too low. Non-OTEL metric collection implementations (e.g. metrics scraped from Spring Boot actuator/prometheus and delivered to a Prometheus instance with Grafana UI on top) do not seem to have this limitation, at least not at 63.

@tomilchik tomilchik added the Bug Something isn't working label Jul 26, 2023
@trask
Copy link
Member

trask commented Jul 26, 2023

see open-telemetry/opentelemetry-specification#3422

we are hoping to get this restriction lifted

@tomilchik
Copy link
Author

That's a good news! Any estimates on when/version?

@trask
Copy link
Member

trask commented Jul 26, 2023

sorry, no

@jkwatson
Copy link
Contributor

jkwatson commented Aug 2, 2023

closing this, as it's not an issue we can address without a spec change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants