I'm currently using the OpenTelemetry Java agent in my Scala application and am encountering some issues.
The error I'm experiencing is as follows:
[otel.javaagent 2023-06-13 13:02:12:461 +0000] [PeriodicMetricReader-1] WARN io.opentelemetry.sdk.metrics.internal.state.AsynchronousMetricStorage - Instrument db.client.connections.usage has recorded multiple values for the same attributes.
I'm not sure why this is happening or how to fix it. I've considered a few potential issues:
Concurrency: I do have multiple threads that might be recording measurements simultaneously, but I believed this was handled by the OpenTelemetry SDK. Misuse of Instruments: I'm not certain if I'm using the right type of instrument for my use case, but db.client.connections.usage seems to be the best fit.
I'm also using version 1.25.1 of the OpenTelemetry Java agent SDK.
If anyone has encountered a similar issue or has any suggestions on what might be causing this and how to fix it, I would appreciate your help. Thank you.
(This question predates version 2.13.0 but the warning given is the same)
If you're using opentelemetry-javaagent version 2.13.0 there's a bug that causes lots of these warning logs.
It's fixed in version 2.13.1. https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v2.13.1
Backport: Fix double instrumentation of Java runtime metrics
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With