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

Add a property to disable Observations starting with a prefix #34802

Closed
Tracked by #35776
jonatan-ivanov opened this issue Mar 28, 2023 · 3 comments
Closed
Tracked by #35776

Add a property to disable Observations starting with a prefix #34802

jonatan-ivanov opened this issue Mar 28, 2023 · 3 comments
Assignees
Labels
theme: observability Issues related to observability type: enhancement A general enhancement
Milestone

Comments

@jonatan-ivanov
Copy link
Member

It seems there is a good amount of users who are registering an ObservationPredicate in order to disable Observations for Spring Security, something like this:

@Bean
ObservationPredicate noSpringSecurityObservations() {
    return (name, context) -> !name.startsWith("spring.security.");
}

I think this common use-case could be simplified by creating this bean and let the users to configure this using a single property.

@jonatan-ivanov jonatan-ivanov added type: enhancement A general enhancement status: waiting-for-triage An issue we've not yet triaged theme: observability Issues related to observability labels Mar 28, 2023
@jonatan-ivanov jonatan-ivanov added this to the 3.x milestone Mar 28, 2023
@scottfrederick scottfrederick removed the status: waiting-for-triage An issue we've not yet triaged label Mar 28, 2023
@philwebb philwebb mentioned this issue Jun 7, 2023
31 tasks
@philwebb philwebb modified the milestones: 3.x, 3.2.x Jun 7, 2023
@mhalbritter mhalbritter self-assigned this Jun 13, 2023
@mhalbritter mhalbritter modified the milestones: 3.2.x, 3.2.0-M1 Jun 13, 2023
@mhalbritter
Copy link
Contributor

Spring Security observations can now be disabled by setting management.observations.spring-security.enabled to false.

@mhalbritter
Copy link
Contributor

mhalbritter commented Jun 13, 2023

Hm. On a second thought, I wonder if spring.security.observations.enabled=false would be a better property name, and if the code should be moved to the org.springframework.boot.actuate.autoconfigure.security package.

@mhalbritter
Copy link
Contributor

After some discussion, we're going to change the scope of this issue a bit. We add properties to disable observations starting with a prefix like the PropertiesMeterFilter already allows for metrics. Then we document that Spring Security observations can be disabled by setting management.observations.enable.spring.security=false.

@mhalbritter mhalbritter reopened this Jun 13, 2023
@mhalbritter mhalbritter modified the milestones: 3.2.0-M1, 3.2.x Jun 13, 2023
@mhalbritter mhalbritter changed the title Add a property to disable Observations for Spring Security Add a property to disable Observations starting with a prefix Jun 13, 2023
@mhalbritter mhalbritter modified the milestones: 3.2.x, 3.2.0-M1 Jun 13, 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: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants