Skip to content

Bug: Metrics rendering uses a not enough precise time unit #4345

Open
@cdprete

Description

@cdprete

Spring Boot Admin Server information

  • Version: 3.5.0

  • Spring Boot version: 3.5.0

  • Configured Security: None

  • Webflux or Servlet application: WebFlux

Client information

  • Spring Boot versions: 3.5.0

  • Used discovery mechanism: Eureka

  • Webflux or Servlet application: Servlet

Description

Hello.

While selecting and displaying a metric in the Metrics page, if a metric involves a kind of time (e.g.: HTTP request time) and Duration is chosen as unit to render it, it's then rendered with not enough granularity.

What I mean with that is that I can see the value rendered up to seconds.
Therefore, if whatever is monitored takes less (e.g.: milliseconds or nanoseconds), you see no updates in the UI for the value, wandering then if everything is really working fine or not.
It's only by switching back to the raw representation that then you can realise that the value is getting updated correctly and it's just the UI implying a too big time unit for it.

Given that from Java 15 the precision of the clock has gone to nanoseconds (https://bugs.openjdk.org/browse/JDK-8242504), the UI should try to render the value with the most fine-grained time unit possible (e.g.: milliseconds if there are no microseconds available, microseconds if there are no nanoseconds available and so on).

Kind regards and thanks in advance for the fix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions