-
Notifications
You must be signed in to change notification settings - Fork 850
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
Lots of duplicate metric definitions for micrometer shim #4381
Comments
@jonatan-ivanov there's a mismatch between the otel metric data model and micrometer. In otel, a metric has a name, description, a unit, and aggregations for each distinct set of attributes. In micrometer, it appears that a metric has a name, and each set of tags (akin to attributes) may have its own description and unit. We talked about this in the 4/14 Java SIG and were curious if there are any plans to change the 2.x micrometer API to associate description and unit with the instrument name, instead of allowing them to vary for each set of tags. If not, could it be considered? |
Is there any current short-term-fix to this? Should I disable my micrometer on the application's |
@jack-berg Based on user feedback, we decided to postpone 2.x indefinitely. We can try to improve this by removing these dynamic parts from the micrometer instrumentation (i.e.: the thread state metrics you mentioned) but this won't fix other instrumentation or when the user sets the description dynamically (though these cases should be rare). @rafaribe @jack-berg A short term solution can be adding a |
@jonatan-ivanov here's a list of all the duplicate metrics I found when running a spring boot application with the spring boot actuator and the micrometer shim: Looks like its not too bad after all! Just noisy logs. |
If you run a simple spring boot app with
spring-boot-starter-actuator
and with themicrometer1-shim
, you get lots of duplicate metric definition warnings like:I enabled better debugging with
Dotel.experimental.sdk.metrics.debug=true
and found that the issue seems to be an incompatibility between the micrometer definition of a metric description and the opentelemetry description. In micrometer it appears that each unique set of tags on an instrument can have its own description. Check out the JvmThreadMetrics for an example.In opentelemetry an instrument is defined by its name, type, description, and unit. If an instrument with the same name, but a different type, description, or unit than one previously created, you've created a semantic error an we log the warnings I've included on this ticket.
We should probably drop micrometer instrument descriptions to ensure we don't create these semantic errors. The unit can be different for each set of tags as well, so we should consider dropping that as well. However, in practice I didn't see any conflicts created by differing units.
The text was updated successfully, but these errors were encountered: