Class ExtendedContextPropagators

java.lang.Object
io.opentelemetry.extension.incubator.propagation.ExtendedContextPropagators

public final class ExtendedContextPropagators extends Object
Utility class to simplify context propagation.

The README explains the use cases in more detail.

  • 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 from OpenTelemetry.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 map
      propagators - provide the propagators from OpenTelemetry.getPropagators()