public interface Extractor<T>
You should implement this class if you want to add possibility to extract information about
JaegerSpanContext that is provided in your custom propagation scheme. Otherwise you should probably use
built-in TextMapCodec
or B3TextMapCodec
B3TextMapCodec
,
TextMapCodec
,
Codec
Modifier and Type | Method and Description |
---|---|
JaegerSpanContext |
extract(T carrier)
Called when
Tracer.extract(io.opentracing.propagation.Format, Object)
is used. |
JaegerSpanContext extract(T carrier)
Called when Tracer.extract(io.opentracing.propagation.Format, Object)
is used. It should handle the logic behind extracting propagation-scheme
specific information from carrier (e.g. http request headers, amqp message headers, etc.).
This method must not modify the carrier
All exceptions thrown from this method will be caught and logged on WARN
level so
that business code execution isn't affected. If possible, catch implementation specific
exceptions and log more meaningful information.
carrier
- input that you extract Span information from, usually TextMap
.JaegerSpanContext
or null
if carrier doesn't contain tracing information, it
is not valid or is incompleteB3TextMapCodec
,
TextMapCodec