Class SingleLineFormatter
- java.lang.Object
-
- io.servicetalk.opentracing.inmemory.SingleLineFormatter
-
- All Implemented Interfaces:
io.opentracing.propagation.Format<SingleLineValue>,InMemoryTraceStateFormat<SingleLineValue>
public final class SingleLineFormatter extends java.lang.Object implements InMemoryTraceStateFormat<SingleLineValue>
Single-line serialization format. Examples:- 00000000000B75A2.00000000000B75A2<:000000000015C003 (no sampling information)
- 00000000000B75A2.00000000000B75A2<:000000000015C003:1 (sampling=true)
-
-
Field Summary
Fields Modifier and Type Field Description static SingleLineFormatterINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InMemoryTraceStateextract(SingleLineValue carrier)Extract the trace state from a carrier.voidinject(InMemoryTraceState state, SingleLineValue carrier)Inject a trace state into a carrier.
-
-
-
Field Detail
-
INSTANCE
public static final SingleLineFormatter INSTANCE
-
-
Method Detail
-
inject
public void inject(InMemoryTraceState state, SingleLineValue carrier)
Description copied from interface:InMemoryTraceStateFormatInject a trace state into a carrier.- Specified by:
injectin interfaceInMemoryTraceStateFormat<SingleLineValue>- Parameters:
state- trace statecarrier- carrier to inject into
-
extract
@Nullable public InMemoryTraceState extract(SingleLineValue carrier)
Description copied from interface:InMemoryTraceStateFormatExtract the trace state from a carrier.- Specified by:
extractin interfaceInMemoryTraceStateFormat<SingleLineValue>- Parameters:
carrier- carrier to extract from- Returns:
- extracted trace state, may be
nullif the carrier doesn't contain a valid span
-
-