the max from "http.server.requests" histogram is a total (application lifespan) max;
the "http.server.requests.max" gauge is a time window max.
It seems that a time window gauge metric gets added to all other histogram metrics as well.
Steps to reproduce
-
Expected behavior
Can anybody explain why OpenTelemetry Micrometer instrumentation adds a time window "max" gauge?
The "http.server.requests.max" time window gauge becomes "http_server_requests_max" in prometheus and therefore overrides the histogram's max value because it would have the same name, as I understand. So it's impossible (out of the box) to get histogram's max value (in case anybody would need it). Is it on purpose? Is it going to stay like that in future?
Such setup is very confusing. Can there be some documentation explaining that it's happening and why?
I'm creating it as a bug because it's not clear if it's a documentation issue only and it pertains to Java instrumentation specifically.
Describe the bug
On a Spring Boot app with Micrometer instrumentation, with all the defaults, OpenTelemetry outputs the following metrics:
The gauge is apparently coming from here: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/9ecf7965aa455d41ea8cc0761b6c6b6eeb106324/instrumentation/micrometer/micrometer-1.5/library/src/main/java/io/opentelemetry/instrumentation/micrometer/v1_5/OpenTelemetryTimer.java#L80
The difference between the "max"es seems to be:
It seems that a time window gauge metric gets added to all other histogram metrics as well.
Steps to reproduce
-
Expected behavior
I'm creating it as a bug because it's not clear if it's a documentation issue only and it pertains to Java instrumentation specifically.
Actual behavior
-
Javaagent or library instrumentation version
2.5.0
Environment
JDK: 17 OS: Windows 10
Additional context
No response