tracing
tracing copied to clipboard
Baggage support in Observation
Currently, there is no direct association between Observation
and Baggage
.
If I want to use baggage, I need to interact with Tracer API. Then, the code needs to mix observation and tracing, which I feel reduces the value of the observation abstraction.
How about tracing-observation-handler to have a list of observation tags that will be converted to baggage?
For example,
Set<String> baggageTags = Set.of("foo.id");
DefaultTracingObservationHandler handler = new DefaultTracingObservationHandler(tracer, baggageTags);
...
When Observation
has foo.id
tag, it will be treated as baggage.
It would be nice to integrate Observation
and Baggage
to eliminate the Tracer API usage in user code for baggage.
I've asked about this topic (Observation's support for Baggage) in https://github.com/micrometer-metrics/tracing/issues/455, so I wonder I this new issue would render my question answered. Wdyt?
duplicate of https://github.com/micrometer-metrics/tracing/issues/455
BTW I really like what @ttddyy suggested. That the fact that a key-value is baggage would become an implementation detail of tracing.