spring-projects / spring-projects/spring-boot
Add a property to disable HTTP Observations for actuator endpoints
Open
@jonatan-ivanov is already working on this.
Since Jun 16, 2023.
status: blocked
theme: observability
type: enhancement
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
It seems there is a good amount of users who are registering an ObservationPredicate in order to disable Observations for /actuator/** endpoints, something like this:
@Bean
ObservationPredicate actuatorServerContextPredicate() {
return (name, context) -> {
if (name.equals("http.server.requests") && context instanceof ServerRequestObservationContext serverContext) {
return !serverContext.getCarrier().getRequestURI().startsWith("<actuator-base-path>");
}
return true;
};
}
I think this common use-case could be simplified by creating a similar bean (for mvc and webflux) and let the users to configure this using a single property.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.