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.
Comment From: mhalbritter
Spring Security observations can now be disabled by setting management.observations.spring-security.enabled to false.
Comment From: mhalbritter
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.
Comment From: mhalbritter
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.