Package io.opencensus.trace.propagation
Class TextFormat.NoopTextFormat
- java.lang.Object
-
- io.opencensus.trace.propagation.TextFormat
-
- io.opencensus.trace.propagation.TextFormat.NoopTextFormat
-
- Enclosing class:
- TextFormat
private static final class TextFormat.NoopTextFormat extends TextFormat
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.opencensus.trace.propagation.TextFormat
TextFormat.Getter<C>, TextFormat.Setter<C>
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNoopTextFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C> SpanContextextract(C carrier, TextFormat.Getter<C> getter)Extracts the span context from upstream.java.util.List<java.lang.String>fields()The propagation fields defined.<C> voidinject(SpanContext spanContext, C carrier, TextFormat.Setter<C> setter)Injects the span context downstream.-
Methods inherited from class io.opencensus.trace.propagation.TextFormat
getNoopTextFormat
-
-
-
-
Method Detail
-
fields
public java.util.List<java.lang.String> fields()
Description copied from class:TextFormatThe propagation fields defined. If your carrier is reused, you should delete the fields here before callingTextFormat.inject(SpanContext, Object, Setter).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.
- Specified by:
fieldsin classTextFormat
-
inject
public <C> void inject(SpanContext spanContext, C carrier, TextFormat.Setter<C> setter)
Description copied from class:TextFormatInjects the span context downstream. For example, as http headers.- Specified by:
injectin classTextFormat- Parameters:
spanContext- possibly not sampled.carrier- holds propagation fields. For example, an outgoing message or http request.setter- invoked for each propagation key to add or remove.
-
extract
public <C> SpanContext extract(C carrier, TextFormat.Getter<C> getter)
Description copied from class:TextFormatExtracts the span context from upstream. For example, as http headers.- Specified by:
extractin classTextFormat- Parameters:
carrier- holds propagation fields. For example, an outgoing message or http request.getter- invoked for each propagation key to get.
-
-