What are you trying to achieve?
Set an attribute to all spans in a trace
What did you expect to see?
Writeable spans on SpanProcessor's OnEnd(Span)
Additional context.
What I tried to implement is a feature called trace field in Honeycomb (reference: AddFieldToTrace)
For that I first tried to use SpanProcessor, but soon found out that OnEnd(Span) is not writeable.
The solution I arrived was to write a custom exporter which was able to read from a thread-local storage (at the time of the implementation, Baggage had yet to be spec'ed out) to list all attributes related to a Trace and insert into the span before exporting.
From what I understood from the SpanProcessor specification, that's the place where I should have placed this logic, as it's a transformation that should happen before the span is sent to any exporter
What are you trying to achieve?
Set an attribute to all spans in a trace
What did you expect to see?
Writeable spans on SpanProcessor's OnEnd(Span)
Additional context.
What I tried to implement is a feature called trace field in Honeycomb (reference:
AddFieldToTrace)For that I first tried to use
SpanProcessor, but soon found out thatOnEnd(Span)is not writeable.The solution I arrived was to write a custom exporter which was able to read from a thread-local storage (at the time of the implementation, Baggage had yet to be spec'ed out) to list all attributes related to a Trace and insert into the span before exporting.
From what I understood from the
SpanProcessorspecification, that's the place where I should have placed this logic, as it's a transformation that should happen before the span is sent to any exporter