-
Notifications
You must be signed in to change notification settings - Fork 879
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
[Micrometer metrics bridge] Default bucket boundaries assume milliseconds base unit #8841
Comments
In the OTel histogram API it's "the base unit that's in use". Honestly I'm not completely sure what my preferred solution for this problem would be. By default Micrometer |
Non-SLO buckets are added here: https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/DistributionStatisticConfig.java#L113 This line is used with the default configuration.
Being consistent with plain micrometer by default is a good idea. This leads to other questions
|
Yes, but only when
I'm thinking it should work exactly as if it was "just Micrometer": if you have a
I don't quite get what you mean by "configuring micrometer histograms". There should be no meaningful difference between the library/javaagent mode, it's the same code after all. I.e. if you want buckets you use the instrument builder to set the SLOs. |
I think I was mistakes about what is done in micrometer vs. the otel micrometer registry. Once I reached that conclusion, I adjusted the otel bucket boundaries instead - leading me to a different question: Should the otel bucket boundaries accommodate for seconds as the base unit? I think this is only relevant in combination with micrometer, because the agent uses explicit buckets when using seconds. Micrometer, however, doesn't use explicit bucket boundaries for http.server.requests.
micrometer is not setting the bucket boundaries for http.server.requests - yet it works out of the box. |
Yeah -- by default micrometer histograms (
If you're talking about the default explicit histogram buckets, there was a discussion about that in open-telemetry/opentelemetry-specification#3509 -- in short, we're not doing it. |
Describe the bug
The default bucket boundaries assume that the base time unit is milliseconds.
The problematic lines:
opentelemetry-java-instrumentation/instrumentation/micrometer/micrometer-1.5/library/src/main/java/io/opentelemetry/instrumentation/micrometer/v1_5/OpenTelemetryTimer.java
Lines 95 to 96 in c9ffa55
First, the value is converted to the base unit (e.g. seconds) and then this value is recorded into the histogram, which assumes that it receives milliseconds.
As a workaround, you can override the default bucket boundaries.
Steps to reproduce
How to fix
I can give it a try - but I'm unsure about the approach.
The text was updated successfully, but these errors were encountered: