- java.lang.Object
-
- brave.propagation.B3Propagation<K>
-
- All Implemented Interfaces:
Propagation<K>
public final class B3Propagation<K> extends java.lang.Object implements Propagation<K>
Implements B3 Propagation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface brave.propagation.Propagation
Propagation.Factory, Propagation.Getter<C,K>, Propagation.KeyFactory<K>, Propagation.Setter<C,K>
-
-
Field Summary
Fields Modifier and Type Field Description static Propagation.FactoryFACTORY-
Fields inherited from interface brave.propagation.Propagation
B3_SINGLE_STRING, B3_STRING
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C> TraceContext.Extractor<C>extractor(Propagation.Getter<C,K> getter)<C> TraceContext.Injector<C>injector(Propagation.Setter<C,K> setter)Replaces a propagated field with the given value.java.util.List<K>keys()The propagation fields defined.
-
-
-
Field Detail
-
FACTORY
public static final Propagation.Factory FACTORY
-
-
Method Detail
-
keys
public java.util.List<K> keys()
Description copied from interface:PropagationThe propagation fields defined. If your carrier is reused, you should delete the fields here before callingPropagation.Setter.put(Object, Object, String).For example, if the carrier is a single-use or immutable request object, you don't need to clear fields as they couldn't have been set before. If it is a mutable, retryable object, successive calls should clear these fields first.
Note: If your implementation carries "extra fields", such as correlation IDs, do not return the names of those fields here. If you do, they will be deleted, which can interfere with user headers.
- Specified by:
keysin interfacePropagation<K>
-
injector
public <C> TraceContext.Injector<C> injector(Propagation.Setter<C,K> setter)
Description copied from interface:PropagationReplaces a propagated field with the given value. Saved as a constant to avoid runtime allocations. For example, a setter for anHttpURLConnectionwould be the method referenceURLConnection.addRequestProperty(String, String)- Specified by:
injectorin interfacePropagation<K>- Parameters:
setter- invoked for each propagation key to add.
-
extractor
public <C> TraceContext.Extractor<C> extractor(Propagation.Getter<C,K> getter)
- Specified by:
extractorin interfacePropagation<K>- Parameters:
getter- invoked for each propagation key to get.
-
-