Skip to content

Link observability section to Micrometer Observation Handler docs #34994

@david0

Description

@david0

To me http_server_requests_active_seconds seems to be completly undocumented, so it would be nice to document that metric somewhere.

I also think that all of these metrics should have a help text on prometheus. At least that is where I rely on usually and I do not see a reason why not to have it.

Activity

bclozel

bclozel commented on Jun 4, 2025

@bclozel
Member

I'm not sure we should document that at the Spring Framework level, because I think it ultimately depends on the Micrometer configuration directly. I believe this is a long task timer automatically configured with micrometer observations, but this can be disabled. Maybe we should point to some Micrometer Observation reference documentation for that, but I couldn't find a particular section.

As for the "prometheus help text", are you referring to the description field for metrics? If so, this is not supported directly at the moment by Micrometer.

Pinging @shakuzen @jonatan-ivanov to get their opinion.

added
in: webIssues in web modules (web, webmvc, webflux, websocket)
theme: observabilityAn issue related to observability and tracing
on Jun 4, 2025
david0

david0 commented on Jun 4, 2025

@david0
Author

As for the "prometheus help text", are you referring to the description field for metrics?

Yes, in micrometer terminology its description.
I see its not easy and also micrometer needs to be changed, still I think it should be done somehow.

Besides that, I think it really should be in the Spring Reference documentation. Even if its just implicitly brought in with micrometer, I assume its what most people have and also what a lot of people are interested in to understand.

jonatan-ivanov

jonatan-ivanov commented on Jun 4, 2025

@jonatan-ivanov
Member

I also think that all of these metrics should have a help text on prometheus. At least that is where I rely on usually and I do not see a reason why not to have it.

Please see this comment on the issue that Brian linked: micrometer-metrics/micrometer#5478 (comment).
TL;DR: it is only used for metrics, there are not a lot of backends that support it, and other than this issue we only saw one request for this functionality. The disadvantage is adding an extra reference to the Observation.Context (performance).

I think it would be nice to have it, although I don't know any use-case for this other than Prometheus on top of my hear right now. Maybe we could use this in docs-gen when we generate documentation for Observations?

To me http_server_requests_active_seconds seems to be completly undocumented, so it would be nice to document that metric somewhere.

In order to document this, there are a few things we need to consider:

  1. This metric name only exists as-is if you use Prometheus. We support 20+ protocols/formats. Maybe we could document the names of the meters: http.server.requests and http.server.requests.active. Would that help?
  2. Metrics are optional and when Spring Framework instruments itself it does not know what meters will be created. But it knows what observations are created which is available in the docs.
  3. Maybe in the Micrometer docs, we could create a section for DefaultMeterObservationHandler and describe what metrics it will create and reference that from the framework docs?
shakuzen

shakuzen commented on Jun 5, 2025

@shakuzen
Member

Maybe we should point to some Micrometer Observation reference documentation for that, but I couldn't find a particular section.

Maybe in the Micrometer docs, we could create a section for DefaultMeterObservationHandler and describe what metrics it will create and reference that from the framework docs?

I've opened micrometer-metrics/micrometer#6361 for that.

changed the title [-]Document http_server_requests_active_seconds[/-] [+]Link observability section to Micrometer Observation Handler docs[/+] on Jun 5, 2025
added and removed
in: webIssues in web modules (web, webmvc, webflux, websocket)
on Jun 5, 2025
added this to the 7.0.x milestone on Jun 5, 2025
added
status: blockedAn issue that's blocked on an external project change
on Jun 5, 2025
bclozel

bclozel commented on Jun 5, 2025

@bclozel
Member

Thanks team!
I've repurposed this issue. We will link to this new doc when it's live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: blockedAn issue that's blocked on an external project changetheme: observabilityAn issue related to observability and tracingtype: documentationA documentation task

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bclozel@david0@jonatan-ivanov@shakuzen@spring-projects-issues

        Issue actions

          Link observability section to Micrometer Observation Handler docs · Issue #34994 · spring-projects/spring-framework