Package org.springframework.security.config.observation

# Class SecurityObservationSettings

java.lang.Object
org.springframework.security.config.observation.SecurityObservationSettings

public final class SecurityObservationSettings extends Object
An `ObservationPredicate` that can be used to change which Spring Security observations are made with Micrometer.

By default, web requests are not observed and authentications and authorizations are observed.

Since:
  6.4

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`SecurityObservationSettings.Builder`
A builder for configuring a `SecurityObservationSettings`

## Method Summary

Modifier and Type
Method
Description
`static SecurityObservationSettings`
`noObservations()`
Make no Spring Security observations
`boolean`
`shouldObserveAuthentications()`
`boolean`
`shouldObserveAuthorizations()`
`boolean`
`shouldObserveRequests()`
`static SecurityObservationSettings.Builder`
`withDefaults()`
Begin the configuration of a `SecurityObservationSettings`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### noObservations

public static SecurityObservationSettings noObservations()
Make no Spring Security observations

Returns:
  a `SecurityObservationSettings` with all exclusions turned on

### withDefaults

public static SecurityObservationSettings.Builder withDefaults()
Begin the configuration of a `SecurityObservationSettings`

Returns:
  a `SecurityObservationSettings.Builder` where filter chain observations are off and authn/authz observations are on

### shouldObserveRequests

public boolean shouldObserveRequests()

### shouldObserveAuthentications

public boolean shouldObserveAuthentications()

### shouldObserveAuthorizations

public boolean shouldObserveAuthorizations()