-
Notifications
You must be signed in to change notification settings - Fork 873
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
OpenTelemetryMeterRegistry is registered despite instrumentation being disabled #6300
Comments
Dug more inside logs and turns out that
I can't say it's very obvious since this is not documented anywhere. Perhaps you can check if |
Hey we stumbled across the same problem. The metrics exporter is set to "none" but we were also seeing the same warning about the instrument name length. |
Hi!
It seems that some metrics from autoinstrumented libraries cannot be transported via opentelemetry because the maximum length of the instrument's name is restricted to 63 characters for performance reasons. Do I understand this correctly? At least from our current experiences (and we are still at the starting point with otel) we can tell that the longest metric name in our prometheus tsdb which was ingested via otel java agent and otel collector has 63 characters ( Is there a way to get around this limitation from the user side or any plans in the future to shorten instrument names which are too long? Or is this a limitation of which one has to be aware of before deciding to use otel? Thx! |
Linking related spec issue: open-telemetry/opentelemetry-specification#3422 |
FYI the We ran into the issue described here #7360 and we needed to disable it to circumvent the issue. |
@jebeaudet you can actually leave OTel Spring Boot instrumentation enabled but disable Micrometer Shim with This should fix the metrics issue without disabling Spring Boot Auto-Instrumentation all together. |
@ViliusS Thanks for the suggestion. However, in my case, this shim config class didn't match in the first place because |
Describe the bug
I'm using
opentelemetry-javaagent
with my spring boot application and I started getting this error:From the error message I see that my metric name is too long for opentelemetry, however I'm using Micrometer with prometheus exporter and I'd like to opt-out from metrics part of it.
My configuration explicitly disables metrics exporter and I also tried to disable
micrometer
instrumentation:but I cannot get rid of the warning.
From debugging I see that
OpenTelemetryMeterRegistry
is registered inCompositeMeterRegistry
, I assume it comes fromMetricsInstrumentation
, but I might be wrong.Steps to reproduce
Start spring-boot application with
opentelemetry-javaagent
that declares a metric with large name:What did you expect to see?
OpenTelemetryMeterRegistry
is not added to global registry when metrics export is disabled and/or micrometer instrumentation is disabled.What did you see instead?
OpenTelemetryMeterRegistry
is added to global registry and warns about invalid metrics.What version are you using?
v1.15.0
Environment
Compiler: OpenJDK (Amazon Coretto) 17.0.1+12-LTS
OS: MacOS 12.3
Additional context
From debug logs I see that instrumentation was correctly disabled:
The text was updated successfully, but these errors were encountered: