Class W3CPropagation

java.lang.Object
brave.propagation.Propagation.Factory
io.micrometer.tracing.brave.bridge.W3CPropagation
All Implemented Interfaces:
brave.propagation.Propagation<String>

public class W3CPropagation extends brave.propagation.Propagation.Factory implements brave.propagation.Propagation<String>
Adopted from OpenTelemetry API.

Implementation of the TraceContext propagation protocol. See w3c/distributed-tracing.

Since:
1.0.0
  • Nested Class Summary

    Nested classes/interfaces inherited from interface brave.propagation.Propagation

    brave.propagation.Propagation.Factory, brave.propagation.Propagation.Getter<R extends Object,K extends Object>, brave.propagation.Propagation.KeyFactory<K extends Object>, brave.propagation.Propagation.RemoteGetter<R extends Object>, brave.propagation.Propagation.RemoteSetter<R extends Object>, brave.propagation.Propagation.Setter<R extends Object,K extends Object>
  • Field Summary

    Fields inherited from interface brave.propagation.Propagation

    B3_SINGLE_STRING, B3_STRING
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of W3CPropagation without baggage support.
    W3CPropagation(io.micrometer.tracing.BaggageManager baggageManager, List<String> localFields)
    Creates an instance of W3CPropagation with baggage support.
  • Method Summary

    Modifier and Type
    Method
    Description
    <K> brave.propagation.Propagation<K>
    create(brave.propagation.Propagation.KeyFactory<K> keyFactory)
     
    <R> brave.propagation.TraceContext.Extractor<R>
    extractor(brave.propagation.Propagation.Getter<R,String> getter)
     
    <R> brave.propagation.TraceContext.Injector<R>
    injector(brave.propagation.Propagation.Setter<R,String> setter)
     
     

    Methods inherited from class brave.propagation.Propagation.Factory

    decorate, get, requires128BitTraceId, supportsJoin

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • W3CPropagation

      public W3CPropagation(io.micrometer.tracing.BaggageManager baggageManager, List<String> localFields)
      Creates an instance of W3CPropagation with baggage support.
      Parameters:
      baggageManager - baggage manager
      localFields - local fields to be registered as baggage
    • W3CPropagation

      public W3CPropagation()
      Creates an instance of W3CPropagation without baggage support.
  • Method Details

    • create

      public <K> brave.propagation.Propagation<K> create(brave.propagation.Propagation.KeyFactory<K> keyFactory)
      Specified by:
      create in class brave.propagation.Propagation.Factory
    • keys

      public List<String> keys()
      Specified by:
      keys in interface brave.propagation.Propagation<String>
    • injector

      public <R> brave.propagation.TraceContext.Injector<R> injector(brave.propagation.Propagation.Setter<R,String> setter)
      Specified by:
      injector in interface brave.propagation.Propagation<String>
    • extractor

      public <R> brave.propagation.TraceContext.Extractor<R> extractor(brave.propagation.Propagation.Getter<R,String> getter)
      Specified by:
      extractor in interface brave.propagation.Propagation<String>