Class SingleLineFormatter
java.lang.Object
io.servicetalk.opentracing.inmemory.SingleLineFormatter
- All Implemented Interfaces:
io.opentracing.propagation.Format<SingleLineValue>
,InMemorySpanContextExtractor<SingleLineValue>
,InMemorySpanContextFormat<SingleLineValue>
,InMemorySpanContextInjector<SingleLineValue>
public final class SingleLineFormatter
extends Object
implements InMemorySpanContextFormat<SingleLineValue>
Single-line serialization format. Examples:
- 00000000000B75A2.00000000000B75A2<:000000000015C003 (no sampling information)
- 00000000000B75A2.00000000000B75A2<:000000000015C003:1 (sampling=true)
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.opentracing.propagation.Format
io.opentracing.propagation.Format.Builtin<C extends Object>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionextract
(SingleLineValue carrier) Extract the trace state from a carrier.void
inject
(InMemorySpanContext context, SingleLineValue carrier) Inject a trace state into a carrier.
-
Field Details
-
INSTANCE
Singleton instance.
-
-
Method Details
-
inject
Description copied from interface:InMemorySpanContextInjector
Inject a trace state into a carrier.- Specified by:
inject
in interfaceInMemorySpanContextInjector<SingleLineValue>
- Parameters:
context
- span contextcarrier
- carrier to inject into
-
extract
Description copied from interface:InMemorySpanContextExtractor
Extract the trace state from a carrier.- Specified by:
extract
in interfaceInMemorySpanContextExtractor<SingleLineValue>
- Parameters:
carrier
- carrier to extract from- Returns:
- extracted
InMemorySpanContext
, may benull
if the carrier doesn't contain a valid span
-