Class NoopTags.NoopTagContextTextFormat
java.lang.Object
io.opencensus.tags.propagation.TagContextTextFormat
io.opencensus.tags.NoopTags.NoopTagContextTextFormat
- Enclosing class:
NoopTags
@Immutable
private static final class NoopTags.NoopTagContextTextFormat
extends TagContextTextFormat
-
Nested Class Summary
Nested classes/interfaces inherited from class TagContextTextFormat
TagContextTextFormat.Getter<C>, TagContextTextFormat.Setter<C> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final NoopTags.NoopTagContextTextFormat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<C> TagContextextract(C carrier, TagContextTextFormat.Getter<C> getter) Extracts the tag context from upstream.fields()The propagation fields defined.<C> voidinject(TagContext tagContext, C carrier, TagContextTextFormat.Setter<C> setter) Injects the tag context downstream.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
NoopTagContextTextFormat
private NoopTagContextTextFormat()
-
-
Method Details
-
fields
Description copied from class:TagContextTextFormatThe propagation fields defined. If your carrier is reused, you should delete the fields here before callingTagContextTextFormat.inject(TagContext, 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 classTagContextTextFormat
-
inject
public <C> void inject(TagContext tagContext, C carrier, TagContextTextFormat.Setter<C> setter) throws TagContextSerializationException Description copied from class:TagContextTextFormatInjects the tag context downstream. For example, as http headers.- Specified by:
injectin classTagContextTextFormat- Parameters:
tagContext- the tag context.carrier- holds propagation fields. For example, an outgoing message or http request.setter- invoked for each propagation key to add or remove.- Throws:
TagContextSerializationException- if the given tag context cannot be serialized.
-
extract
public <C> TagContext extract(C carrier, TagContextTextFormat.Getter<C> getter) throws TagContextDeserializationException Description copied from class:TagContextTextFormatExtracts the tag context from upstream. For example, as http headers.- Specified by:
extractin classTagContextTextFormat- Parameters:
carrier- holds propagation fields. For example, an outgoing message or http request.getter- invoked for each propagation key to get.- Throws:
TagContextDeserializationException- if the input is invalid
-