public class BinaryCodec extends java.lang.Object implements Codec<io.opentracing.propagation.Binary>
| Modifier and Type | Class and Description |
|---|---|
static class |
BinaryCodec.Builder
This class is the builder for the BinaryCodec.
|
| Constructor and Description |
|---|
BinaryCodec()
Constructor for a Binary Codec.
|
| Modifier and Type | Method and Description |
|---|---|
static BinaryCodec.Builder |
builder()
Returns a builder for BinaryCodec.
|
JaegerSpanContext |
extract(io.opentracing.propagation.Binary carrier)
Called when
Tracer.extract(io.opentracing.propagation.Format, Object)
is used. |
void |
inject(JaegerSpanContext spanContext,
io.opentracing.propagation.Binary carrier)
Called when
Tracer.inject(io.opentracing.SpanContext, Format, Object)
is used. |
java.lang.String |
toString() |
public void inject(JaegerSpanContext spanContext, io.opentracing.propagation.Binary carrier)
InjectorCalled 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.
inject in interface Injector<io.opentracing.propagation.Binary>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,
TextMapCodecpublic JaegerSpanContext extract(io.opentracing.propagation.Binary carrier)
ExtractorCalled 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.
extract in interface Extractor<io.opentracing.propagation.Binary>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,
TextMapCodecpublic java.lang.String toString()
toString in class java.lang.Objectpublic static BinaryCodec.Builder builder()