Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having AspectJ and Micrometer on the classpath is not a strong enough signal to enable support for Micrometer observation annotations #39128

Closed
bclozel opened this issue Jan 15, 2024 · 6 comments
Assignees
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

Comments

@bclozel
Copy link
Member

bclozel commented Jan 15, 2024

As of #37626, Spring Boot 3.2 auto-configures AspectJ handlers to support observation annotations like @Timed and @Counted with MetricsAspectsAutoConfiguration. Spring Boot 3.3 will expand that for tracing annotations in MicrometerTracingAutoConfiguration.

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 default false 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.

@bclozel bclozel added type: bug A general bug theme: observability Issues related to observability labels Jan 15, 2024
@bclozel bclozel added this to the 3.2.x milestone Jan 15, 2024
@bclozel bclozel self-assigned this Jan 15, 2024
@bclozel bclozel added the status: noteworthy A noteworthy issue to call out in the release notes label Jan 15, 2024
@bclozel bclozel modified the milestones: 3.2.x, 3.2.2 Jan 15, 2024
@wilkinsona wilkinsona changed the title Add configuration property for enabling micrometer observation annotations support Having AspectJ and Micrometer on the classpath is not a strong enough signal to enable support for Micrometer observation annotations Jan 15, 2024
@DRoppelt
Copy link

DRoppelt commented Feb 10, 2024

We'll make this noteworthy in the release notes.

It seems like that might have been forgotten in the release notes? I like this change but have not perceived it as a noteworthy change in the release notes/blog. It does show up under "bugfixes". https://github.com/spring-projects/spring-boot/releases/tag/v3.2.2

I think the notes should be updated to highlight that change better?

@wilkinsona
Copy link
Member

Thanks, @DRoppelt. Looks like we missed this during the release. I've added a Noteworthy Changes section to the top of the release notes for 3.2.2.

@DarkAtra
Copy link

hey @wilkinsona, just noticed that the release notes are incorrect. It says the property is management.observations.annotations.enabled but the actual name seems to be micrometer.observations.annotations.enabled.

@philwebb
Copy link
Member

Thanks @DarkAtra, I've edited the notes.

@wilkinsona
Copy link
Member

I think that may be a mistake in the code as we have ObservationProperties with a management.observations prefix.

@bclozel
Copy link
Member Author

bclozel commented Feb 16, 2024

My mistake, I've created #39600 to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: noteworthy A noteworthy issue to call out in the release notes theme: observability Issues related to observability type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants