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 SingleLineFormatter
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InMemoryTraceState
extract(SingleLineValue carrier)
Extract the trace state from a carrier.void
inject(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:InMemoryTraceStateFormat
Inject a trace state into a carrier.- Specified by:
inject
in interfaceInMemoryTraceStateFormat<SingleLineValue>
- Parameters:
state
- trace statecarrier
- carrier to inject into
-
extract
@Nullable public InMemoryTraceState extract(SingleLineValue carrier)
Description copied from interface:InMemoryTraceStateFormat
Extract the trace state from a carrier.- Specified by:
extract
in interfaceInMemoryTraceStateFormat<SingleLineValue>
- Parameters:
carrier
- carrier to extract from- Returns:
- extracted trace state, may be
null
if the carrier doesn't contain a valid span
-
-