You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add property to disable Spring Security observations
Setting 'management.observations.spring-security.enabled' installs an
ObservationPredicate, which prevents all observations starting with
'spring.security.' to be created.
Closesgh-34802
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/observation/ObservationAutoConfiguration.java
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/ObservationAutoConfigurationTests.java
If you'd like to prevent some observations from being reported, you can register beans of type `ObservationPredicate`.
44
+
Observations are only reported if all the `ObservationPredicate` beans return `true` for that observation.
45
+
46
+
include::code:MyObservationPredicate[]
47
+
48
+
The preceding example will prevent all observations with a name starting with "denied.prefix.".
49
+
50
+
TIP: If you want to prevent Spring Security from reporting observations, set the property configprop:management.observations.spring-security.enabled[] to `false`.
51
+
40
52
The next sections will provide more details about logging, metrics and traces.
0 commit comments