...
NOTES:
1.Using the ObservationRegistryCustomizer would still track /actuator manual calls, so but it was removedkept in to kept UnitTests running
Code Block | ||||
---|---|---|---|---|
| ||||
ObservationRegistryCustomizer<ObservationRegistry> skipActuatorEndpointsFromObservation() { PathMatcher pathMatcher = new AntPathMatcher("/"); return registry -> registry.observationConfig().observationPredicate(observationPredicate(pathMatcher)); } static ObservationPredicate observationPredicate(PathMatcher pathMatcher) { return (name, context) -> { if (context instanceof ServerRequestObservationContext observationContext) { return !pathMatcher.match("/actuator/**", observationContext.getCarrier().getRequestURI()); } else { return !SCHEDULED_TASK_NAME.equals(name); } }; } |
...