spring-projects / spring-projects/spring-boot
Adding custom ObservationHandler does not preserve the default ObservationHandlers
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
Spring Boot version
3.0.4
Reproducible example
https://github.com/violetagg/netty-observation-repro
Problem description
I would like to use Reactor Netty tracing capabilities in Spring Boot application.
For this purpose I need to reuse the ObservationRegistry created by Spring Boot and to add ObservationHandlers provided by Reactor Netty.
Observations:
- If I only reuse the
ObservationRegistrywithout adding theObservationHandlers provided by Reactor Netty - the tracing information is correctly visualised but the span tags are duplicated and one and the same Timer object is created every time.

-
If I reuse the
ObservationRegistryand addObservationHandlers provided by Reactor Netty - the tracing information is NOT correctly visualised. -
If I reuse the
ObservationRegistry, addObservationHandlers provided by Reactor Netty and in addition add all defaultObservationHandlers provided by Spring Boot - the tracing information is correctly visualised, the span tags are not duplicated and one and the same Timer object is created only once. Reactor Netty tracing capabilities are working as expected.

Desired solution
Spring Boot should preserve the default ObservationHandlers when custom ObservationHandlers are added to the configuration.
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.
Research direction
Start with Spring Boot's ObservationRegistry configuration and the custom ObservationHandler setup described in the issue, then reproduce the behavior with the linked netty-observation-repro example. Trace how adding Reactor Netty handlers affects Spring Boot's default handlers; done means custom handlers coexist with the defaults and the expected tracing, span tags, and timer behavior are preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100