Package brave.propagation.stackdriver
Class StackdriverTracePropagation
java.lang.Object
brave.propagation.stackdriver.StackdriverTracePropagation
- All Implemented Interfaces:
brave.propagation.Propagation<String>
public class StackdriverTracePropagation
extends Object
implements brave.propagation.Propagation<String>
Stackdriver Trace propagation.
Tries to extract a trace ID and span ID using the B3 key set, such as X-B3-TraceId,
X-B3-SpanId, etc. If not present, tries the x-cloud-trace-context key.
Uses B3Propagation injection, to inject the tracing context using B3 headers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface brave.propagation.Propagation
brave.propagation.Propagation.Getter<R extends Object,K extends Object>, brave.propagation.Propagation.KeyFactory<K extends Object>, brave.propagation.Propagation.RemoteGetter<R extends Object>, brave.propagation.Propagation.RemoteSetter<R extends Object>, brave.propagation.Propagation.Setter<R extends Object, K extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String128 trace ID lower-hex encoded into 32 characters (required)Fields inherited from interface brave.propagation.Propagation
B3_SINGLE_STRING, B3_STRING -
Method Summary
Modifier and TypeMethodDescription<R> brave.propagation.TraceContext.Extractor<R><R> brave.propagation.TraceContext.Injector<R>keys()static brave.propagation.Propagation.FactorynewFactory(brave.propagation.Propagation.Factory primary)
-
Field Details
-
TRACE_ID_NAME
128 trace ID lower-hex encoded into 32 characters (required)- See Also:
-
-
Method Details
-
newFactory
public static brave.propagation.Propagation.Factory newFactory(brave.propagation.Propagation.Factory primary) - Parameters:
primary- typically constructed byB3Propagation.newFactoryBuilder()
-
keys
- Specified by:
keysin interfacebrave.propagation.Propagation<String>
-
injector
public <R> brave.propagation.TraceContext.Injector<R> injector(brave.propagation.Propagation.Setter<R, String> setter) - Specified by:
injectorin interfacebrave.propagation.Propagation<String>
-
extractor
public <R> brave.propagation.TraceContext.Extractor<R> extractor(brave.propagation.Propagation.Getter<R, String> getter) - Specified by:
extractorin interfacebrave.propagation.Propagation<String>
-