micrometer-metrics / micrometer-docs

Static website and documentation for Micrometer.
Apache License 2.0
50 stars 82 forks source link

Possible incorrect property specified for Enabling Annotations #370

Closed jhopperzw closed 1 month ago

jhopperzw commented 1 month ago

In SB 2.5, we tried setting the property management.observations.annotations.enabled=true based on this section https://docs.spring.io/spring-boot/reference/actuator/observability.html#actuator.observability.annotations. After this, we could not see any of the Metrics for @Timed.

However, if we change this to micrometer.observations.annotations.enabled=true, the metrics started to appear.

jonatan-ivanov commented 1 month ago

You might opened this in the wrong repo, the docs you linked and the property you provided does not belong to Micrometer but to Spring Boot. Also, Spring Boot 2.5 reached its end of life at 2022-05-19, it's out of support, you need to upgrade. The reference doc you linked is for the latest version (3.3 right now), not for 2.5. Boot 2.5 does not support the Observation API and it does not have the property you mentioned so it will do nothing, this is the expected behavior.

However, if we change this to micrometer.observations.annotations.enabled=true, the metrics started to appear.

This is unexpected, Boot 2.5 does not have this property either.