Skip to content

Micrometer "enable" annotations property does not cover observed aspect #45601

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

Closed
wants to merge 1 commit into from

Conversation

nosan
Copy link
Contributor

@nosan nosan commented May 19, 2025

See #45599

When merging this into main, ObservationAnnotationsEnabledCondition should be removed and replaced with @ConditionalOnBooleanProperty("management.observations.annotations.enabled"), and the test allowsObservedAspectToBeEnabledWithDeprecatedProperty should also be removed.

Target branch is 3.3.x

…dAspectConfiguration

Introduced conditions to control `ObservedAspect` bean creation based
on `management.observations.annotations.enabled` and
`micrometer.observations.annotations.enabled` properties

Signed-off-by: Dmytro Nosan <[email protected]>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 19, 2025
@bclozel bclozel added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 19, 2025
@bclozel bclozel added this to the 3.4.6 milestone May 19, 2025
@nosan
Copy link
Contributor Author

nosan commented May 19, 2025

@bclozel

I've created this PR based on 3.3.x because MetricsAspectsAutoConfiguration already contains this logic in 3.3.x. Shouldn't it be merged into 3.3.x?

@bclozel bclozel modified the milestones: 3.4.6, 3.3.12 May 19, 2025
@snicoll snicoll self-assigned this May 20, 2025
snicoll pushed a commit that referenced this pull request May 20, 2025
This commit adds the same conditions that control some observation
aspects to control the creation of an `ObservedAspect` bean. It now is
guarded by  `management.observations.annotations.enabled` and
`micrometer.observations.annotations.enabled`.

See gh-45601

Signed-off-by: Dmytro Nosan <[email protected]>
@snicoll snicoll closed this in b671847 May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants