Class ObservationAwareBaggageThreadLocalAccessor

java.lang.Object
io.micrometer.tracing.contextpropagation.ObservationAwareBaggageThreadLocalAccessor
All Implemented Interfaces:
io.micrometer.context.ThreadLocalAccessor<BaggageToPropagate>

public class ObservationAwareBaggageThreadLocalAccessor extends Object implements io.micrometer.context.ThreadLocalAccessor<BaggageToPropagate>
ThreadLocalAccessor used to propagate baggage via BaggageToPropagate.
Since:
1.2.2
  • Field Details

    • KEY

      public static final String KEY
      Key under which Micrometer Tracing Baggage accessor is being registered.
      See Also:
  • Constructor Details

    • ObservationAwareBaggageThreadLocalAccessor

      public ObservationAwareBaggageThreadLocalAccessor(io.micrometer.observation.ObservationRegistry observationRegistry, Tracer tracer)
      Creates a new instance of this class.
      Parameters:
      observationRegistry - observation registry
      tracer - tracer
      Since:
      1.2.2
  • Method Details

    • key

      public Object key()
      Specified by:
      key in interface io.micrometer.context.ThreadLocalAccessor<BaggageToPropagate>
    • getValue

      public BaggageToPropagate getValue()
      Specified by:
      getValue in interface io.micrometer.context.ThreadLocalAccessor<BaggageToPropagate>
    • setValue

      public void setValue(BaggageToPropagate value)
      Specified by:
      setValue in interface io.micrometer.context.ThreadLocalAccessor<BaggageToPropagate>
    • setValue

      public void setValue()
      Specified by:
      setValue in interface io.micrometer.context.ThreadLocalAccessor<BaggageToPropagate>
    • restore

      public void restore()
      Specified by:
      restore in interface io.micrometer.context.ThreadLocalAccessor<BaggageToPropagate>
    • restore

      public void restore(BaggageToPropagate value)
      Specified by:
      restore in interface io.micrometer.context.ThreadLocalAccessor<BaggageToPropagate>
    • reset

      @Deprecated public void reset()
      Deprecated.
      Specified by:
      reset in interface io.micrometer.context.ThreadLocalAccessor<BaggageToPropagate>