Class ExtendedContextPropagators
java.lang.Object
io.opentelemetry.api.incubator.propagation.ExtendedContextPropagators
Utility class to simplify context propagation.
The README explains the use cases in more detail.
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.opentelemetry.context.ContextextractTextMapPropagationContext(Map<String, String> carrier, io.opentelemetry.context.propagation.ContextPropagators propagators) Extract the context from a string map, which you get from HTTP headers of the metadata of a message you're processing.getTextMapPropagationContext(io.opentelemetry.context.propagation.ContextPropagators propagators) Injects the current context into a string map, which can then be added to HTTP headers or the metadata of a message.
-
Method Details
-
getTextMapPropagationContext
public static Map<String,String> getTextMapPropagationContext(io.opentelemetry.context.propagation.ContextPropagators propagators) Injects the current context into a string map, which can then be added to HTTP headers or the metadata of a message.- Parameters:
propagators- provide the propagators fromOpenTelemetry.getPropagators()
-
extractTextMapPropagationContext
public static io.opentelemetry.context.Context extractTextMapPropagationContext(Map<String, String> carrier, io.opentelemetry.context.propagation.ContextPropagators propagators) Extract the context from a string map, which you get from HTTP headers of the metadata of a message you're processing.- Parameters:
carrier- the string mappropagators- provide the propagators fromOpenTelemetry.getPropagators()
-