public interface Injector<T>
You should implement this class if you want to add possibility to inject information about
SpanContext that is passed between services in your custom propagation scheme. Otherwise you
should probably use built-in TextMapCodec or B3TextMapCodec
TextMapCodec,
B3TextMapCodec,
Codec| Modifier and Type | Method and Description |
|---|---|
void |
inject(SpanContext spanContext,
T carrier)
Called when
Tracer.inject(...) is used. |
void inject(SpanContext spanContext, T carrier)
Called when Tracer.inject(...) is used. It should handle the logic behind injecting propagation scheme
specific information into the carrier (e.g. http request headers, amqp message headers,
etc.).
All exceptions thrown from this method will be caught and logged on ERROR level so
that business code execution isn't affected. If possible, catch implementation specific
exceptions and log more meaningful information.
spanContext - span context that should be used to pass trace information with the carriercarrier - holder of data that is used to pass tracing information between processesB3TextMapCodec,
TextMapCodec