micrometer-metrics / micrometer

An application observability facade for the most popular observability tools. Think SLF4J, but for observability.
https://micrometer.io
Apache License 2.0
4.42k stars 977 forks source link

Improve windowed "max" documentation #5068

Closed artemik closed 1 month ago

artemik commented 3 months ago

Please describe the feature request. I'd like Micrometer docs to explain more about time windowed "max" values.

Rationale Previously, there was ticket (https://github.com/micrometer-metrics/micrometer/issues/1587) about confusion around it which led to this improvement: https://github.com/micrometer-metrics/micrometer-docs/pull/101. However, the current explanation in Micrometer docs (in here https://docs.micrometer.io/micrometer/reference/concepts/distribution-summaries.html) is confusing for me as an end user, because it's not clear what it practically means, sounds more like implementation detail, and is buried quite deep (regardless of it being highlighted with a "Note" box).

Practically, currently I see Spring Boot outputs the following metrics:

It's not easily clear which one means what and why there are two. For example, in Grafana I just see one of them, because probably one overrides the other.

It would be great if docs provided practical example (something like saying "for example in Spring, http.server.requests.max is a time windowed max...").

As I understand, Micrometer doesn't specify an exact list of metrics with their meanings (unlike OpenTelemetry), so because it's Spring who actually outputs those, it could be more issue of Spring docs that don't explain it (currently, doesn't explain anything besides the name: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator.metrics.supported.spring-mvc), so let me know if you think it's an issue for them instead, but since Micrometer mentioned already windowed max in the docs, since it provides reference implementation for some other components, and since the end goal is making it clear for users anyway, it could be worth explaining in Micrometer docs.

jonatan-ivanov commented 1 month ago

Practically, currently I see Spring Boot outputs the following metrics: http.server.requests histogram (who has "max"); http.server.requests.max gauge. It's not easily clear which one means what and why there are two. For example, in Grafana I just see one of them, because probably one overrides the other.

I'm not sure what is going on here, you are saying that you see two maxes but then you say you only see one? Which registry are you using? If this is Prometheus, there should be only one max (a gauge), the histogram does not have a max and there are no overrides.

It would be great if docs provided practical example (something like saying "for example in Spring, http.server.requests.max is a time windowed max...").

Micrometer does not depend on Spring, it does not know about http.server.requests.max, that one is Spring-relates so it should live in the Spring docs (afaik it mentions it). The Micrometer docs do mention that max is a time-window max.

As I understand, Micrometer doesn't specify an exact list of metrics with their meanings (unlike OpenTelemetry), so because it's Spring who actually outputs those, it could be more issue of Spring docs that don't explain it (currently, doesn't explain anything besides the name: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator.metrics.supported.spring-mvc), so let me know if you think it's an issue for them instead, but since Micrometer mentioned already windowed max in the docs, since it provides reference implementation for some other components, and since the end goal is making it clear for users anyway, it could be worth explaining in Micrometer docs.

http.server.requests is created by Spring Framework, you should look into those docs not Spring Boot.

It's not really clear to me what doc improvements you want but please feel free to add more details to this issue and/or open a PR, we are happy to review it.

github-actions[bot] commented 1 month ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

github-actions[bot] commented 1 month ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open.