public final class SingleLineFormatter extends java.lang.Object implements InMemoryTraceStateFormat<SingleLineValue>
Modifier and Type | Field and Description |
---|---|
static SingleLineFormatter |
INSTANCE |
Modifier and Type | Method and 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.
|
public static final SingleLineFormatter INSTANCE
public void inject(InMemoryTraceState state, SingleLineValue carrier)
InMemoryTraceStateFormat
inject
in interface InMemoryTraceStateFormat<SingleLineValue>
state
- trace statecarrier
- carrier to inject into@Nullable public InMemoryTraceState extract(SingleLineValue carrier)
InMemoryTraceStateFormat
extract
in interface InMemoryTraceStateFormat<SingleLineValue>
carrier
- carrier to extract fromnull
if the carrier doesn't contain a valid span