Class PropagatorsInitializer


  • public class PropagatorsInitializer
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void initializePropagators​(java.util.List<java.lang.String> propagatorIds)
      Initialize OpenTelemetry global Propagators with propagator list, if any.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropagatorsInitializer

        public PropagatorsInitializer()
    • Method Detail

      • initializePropagators

        public static void initializePropagators​(java.util.List<java.lang.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.