Package io.opencensus.trace.propagation
Class PropagationComponent
- java.lang.Object
-
- io.opencensus.trace.propagation.PropagationComponent
-
- Direct Known Subclasses:
PropagationComponent.NoopPropagationComponent
,PropagationComponentImpl
public abstract class PropagationComponent extends java.lang.Object
Container class for all the supported propagation formats. Currently supports only Binary format (seeBinaryFormat
) and B3 Text format (seeTextFormat
) but more formats will be added.- Since:
- 0.5
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
PropagationComponent.NoopPropagationComponent
-
Field Summary
Fields Modifier and Type Field Description private static PropagationComponent
NOOP_PROPAGATION_COMPONENT
-
Constructor Summary
Constructors Constructor Description PropagationComponent()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TextFormat
getB3Format()
Returns the B3TextFormat
with the provided implementations.abstract BinaryFormat
getBinaryFormat()
Returns theBinaryFormat
with the provided implementations.static PropagationComponent
getNoopPropagationComponent()
Returns an instance that contains no-op implementations for all the instances.abstract TextFormat
getTraceContextFormat()
Returns the TraceContextTextFormat
with the provided implementations.
-
-
-
Field Detail
-
NOOP_PROPAGATION_COMPONENT
private static final PropagationComponent NOOP_PROPAGATION_COMPONENT
-
-
Method Detail
-
getBinaryFormat
public abstract BinaryFormat getBinaryFormat()
Returns theBinaryFormat
with the provided implementations. If no implementation is provided then no-op implementation will be used.- Returns:
- the
BinaryFormat
implementation. - Since:
- 0.5
-
getB3Format
@ExperimentalApi public abstract TextFormat getB3Format()
Returns the B3TextFormat
with the provided implementations. See b3-propagation for more information. If no implementation is provided then no-op implementation will be used.- Returns:
- the B3
TextFormat
implementation. - Since:
- 0.11.0
-
getTraceContextFormat
@ExperimentalApi public abstract TextFormat getTraceContextFormat()
Returns the TraceContextTextFormat
with the provided implementations. See w3c/distributed-tracing for more information. If no implementation is provided then no-op implementation will be used.- Returns:
- the TraceContext
TextFormat
implementation. - Since:
- 0.16.0
-
getNoopPropagationComponent
public static PropagationComponent getNoopPropagationComponent()
Returns an instance that contains no-op implementations for all the instances.- Returns:
- an instance that contains no-op implementations for all the instances.
- Since:
- 0.5
-
-