Class PropagatorsInitializer


  • public class PropagatorsInitializer
    extends Object
    • Constructor Detail

      • PropagatorsInitializer

        public PropagatorsInitializer()
    • Method Detail

      • initializePropagators

        public static io.opentelemetry.context.propagation.ContextPropagators initializePropagators​(List<String> propagatorIds)
        Initialize OpenTelemetry global Propagators with propagator list, if any.

        Because TraceMultiPropagator returns first successful extracted Context and stops further extraction, these rules are applied:

        • W3CBaggagePropagator and JaegerPropagator are added outside of the multi-propagator so that they will always runs and extract baggage (note: JaegerPropagator extracts both baggage and context).
        • W3CBaggagePropagator comes after JaegerPropagator, as it can have more complex/complete values that Jaeger baggage lacks, e.g. metadata. Baggage extraction can enrich the previous one.