Skip to content

Commit

Permalink
Fix Observability Opt-out Documentation Typo
Browse files Browse the repository at this point in the history
Issue gh-12268
  • Loading branch information
jzheaux committed Nov 29, 2022
1 parent 701f754 commit c60c107
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Instead, you can alter the provided `ObservationRegistry` with an `ObservationPr
----
@Bean
ObservationRegistryCustomizer<ObservationRegistry> noSpringSecurityObservations() {
ObservationPredicate predicate = (name, context) -> name.startsWith("spring.security.")
ObservationPredicate predicate = (name, context) -> !name.startsWith("spring.security.")
return (registry) -> registry.observationConfig().observationPredicate(predicate)
}
----
Expand All @@ -202,7 +202,7 @@ ObservationRegistryCustomizer<ObservationRegistry> noSpringSecurityObservations(
----
@Bean
fun noSpringSecurityObservations(): ObservationRegistryCustomizer<ObservationRegistry> {
ObservationPredicate predicate = (name: String, context: Observation.Context) -> name.startsWith("spring.security.")
ObservationPredicate predicate = (name: String, context: Observation.Context) -> !name.startsWith("spring.security.")
(registry: ObservationRegistry) -> registry.observationConfig().observationPredicate(predicate)
}
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Instead, you can alter the provided `ObservationRegistry` with an `ObservationPr
----
@Bean
ObservationRegistryCustomizer<ObservationRegistry> noSpringSecurityObservations() {
ObservationPredicate predicate = (name, context) -> name.startsWith("spring.security.")
ObservationPredicate predicate = (name, context) -> !name.startsWith("spring.security.");
return (registry) -> registry.observationConfig().observationPredicate(predicate)
}
----
Expand All @@ -207,7 +207,7 @@ ObservationRegistryCustomizer<ObservationRegistry> noSpringSecurityObservations(
----
@Bean
fun noSpringSecurityObservations(): ObservationRegistryCustomizer<ObservationRegistry> {
ObservationPredicate predicate = (name: String, context: Observation.Context) -> name.startsWith("spring.security.")
ObservationPredicate predicate = (name: String, context: Observation.Context) -> !name.startsWith("spring.security.")
(registry: ObservationRegistry) -> registry.observationConfig().observationPredicate(predicate)
}
----
Expand Down

0 comments on commit c60c107

Please sign in to comment.