Having AspectJ and Micrometer on the classpath is not a strong enough signal to enable support for Micrometer observation annotations #39128
Labels
status: noteworthy
A noteworthy issue to call out in the release notes
theme: observability
Issues related to observability
type: bug
A general bug
Milestone
As of #37626, Spring Boot 3.2 auto-configures AspectJ handlers to support observation annotations like
@Timed
and@Counted
withMetricsAspectsAutoConfiguration
. Spring Boot 3.3 will expand that for tracing annotations inMicrometerTracingAutoConfiguration
.Right now those auto-configurations are conditional on the presence of Micrometer and AspectJ, but we've found that those aspects are quite broadly applied and can significant startup time difference. While this is a fine feature to support, we should restrict a bit its application to ensure that it's only applied when developers choose to. The Aspectj dependency can come from many use cases and is not a good indicator for applications opting-in for this feature.
We should add a
management.observations.annotations.enabled
configuration property and introduce it with a defaultfalse
value. While this changes behavior, we're still early in the 3.2.x generation and this is a impact big enough that we're considering this a bug. We'll make this noteworthy in the release notes.The text was updated successfully, but these errors were encountered: