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

DisableObservabilityContextCustomizer can't be switched off through properties #35009

Closed
asibross opened this issue Apr 14, 2023 · 1 comment
Closed
Assignees
Labels
theme: observability Issues related to observability type: bug A general bug
Milestone

Comments

@asibross
Copy link

asibross commented Apr 14, 2023

The introduction of ObservabilityContextCustomizerFactory and @AutoConfigureObservability is breaking smoke/integration tests that were relying on certain beans to exists.
Basically any auto-configuration that uses @ConditionalOnEnabledTracing when creating beans will be missed in the test context.
The purpose of this issue is to request that this disabling metric/tracing functionality be controlled by a property.

CC: @jonatan-ivanov

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 14, 2023
@mhalbritter mhalbritter added theme: observability Issues related to observability for: team-meeting An issue we'd like to discuss as a team to make progress labels Apr 28, 2023
@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged for: team-meeting An issue we'd like to discuss as a team to make progress labels May 8, 2023
@philwebb philwebb added this to the 3.0.x milestone May 8, 2023
@philwebb
Copy link
Member

philwebb commented May 8, 2023

We discussed this on today's team call and we think we should consider it a bug that there's no way to opt-out of the customizer without an annotation.

We think one way to fix this would be to change DisableObservabilityContextCustomizer so that if there's no annotation it looks for a property. We have some existing testing properties, so it seems reasonable to add more.

Perhaps spring.test.observability.auto-configure where true is the same as @AutoConfigureObservability(true, true) and false is the same as @AutoConfigureObservability(false, false). If an annotation is on the test then it takes precedence.

@mhalbritter mhalbritter self-assigned this May 9, 2023
@mhalbritter mhalbritter changed the title Create a “global” enable/disable option for disabling metrics/tracing in tests DisableObservabilityContextCustomizer can't be switched off through properties May 9, 2023
@mhalbritter mhalbritter modified the milestones: 3.0.x, 3.0.7 May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: observability Issues related to observability type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants