public interface Injector<T>
You should implement this class if you want to add possibility to inject information about
JaegerSpanContext 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(JaegerSpanContext spanContext,
T carrier)
Called when
Tracer.inject(io.opentracing.SpanContext, Format, Object)
is used. |
void inject(JaegerSpanContext spanContext, T carrier)
Called when Tracer.inject(io.opentracing.SpanContext, Format, Object)
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