Package brave.propagation
Class ExtraFieldPropagation.Factory
java.lang.Object
brave.propagation.Propagation.Factory
brave.propagation.ExtraFieldPropagation.Factory
- Enclosing class:
- ExtraFieldPropagation<K>
public static final class ExtraFieldPropagation.Factory extends Propagation.Factory
-
Method Summary
Modifier and Type Method Description <K> ExtraFieldPropagation<K>
create(Propagation.KeyFactory<K> keyFactory)
TraceContext
decorate(TraceContext context)
Decorates the input such that it can propagate extra data, such as a timestamp or a carrier for extra fields.boolean
requires128BitTraceId()
boolean
supportsJoin()
Does the propagation implementation support sharing client and server span IDs.
-
Method Details
-
supportsJoin
public boolean supportsJoin()Description copied from class:Propagation.Factory
Does the propagation implementation support sharing client and server span IDs. For example, should an RPC server span share the same identifiers extracted from an incoming request? In usual B3 Propagation, the parent span ID is sent across the wire so that the client and server can share the same identifiers. Other propagation formats, like trace-context only propagate the calling trace and span ID, with an assumption that the receiver always starts a new child span. When join is supported, you can assume that whenthe parent span ID
is null, you've been propagated a root span. When join is not supported, you must always fork a new child.- Overrides:
supportsJoin
in classPropagation.Factory
-
requires128BitTraceId
public boolean requires128BitTraceId()- Overrides:
requires128BitTraceId
in classPropagation.Factory
-
create
- Specified by:
create
in classPropagation.Factory
-
decorate
Description copied from class:Propagation.Factory
Decorates the input such that it can propagate extra data, such as a timestamp or a carrier for extra fields.Implementations are responsible for data scoping, if relevant. For example, if only global configuration is present, it could suffice to simply ensure that data is present. If data is span-scoped, an implementation might compare the context to its last span ID, copying on write or otherwise to ensure writes to one context don't affect another.
Implementations should be idempotent, returning the same instance instead of re-applying change.
- Overrides:
decorate
in classPropagation.Factory
- See Also:
TraceContext.extra()
-