Class SimplePropagator

java.lang.Object
org.apache.solr.util.tracing.SimplePropagator
All Implemented Interfaces:
io.opentelemetry.context.propagation.TextMapPropagator

public class SimplePropagator extends Object implements io.opentelemetry.context.propagation.TextMapPropagator
Simple Http Header Propagator. When enabled, this will only propagate the trace id from the client to all internal requests. It is also in charge of generating a trace id if none exists.

Note: this is very similar in impl to io.opentelemetry.extension.incubator.propagation.PassThroughPropagator. we should consider replacing/upgrading once that becomes generally available

  • Method Summary

    Modifier and Type
    Method
    Description
    <C> io.opentelemetry.context.Context
    extract(io.opentelemetry.context.Context context, C carrier, io.opentelemetry.context.propagation.TextMapGetter<C> getter)
     
     
    static io.opentelemetry.context.propagation.TextMapPropagator
     
    <C> void
    inject(io.opentelemetry.context.Context context, C carrier, io.opentelemetry.context.propagation.TextMapSetter<C> setter)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • getInstance

      public static io.opentelemetry.context.propagation.TextMapPropagator getInstance()
    • fields

      public Collection<String> fields()
      Specified by:
      fields in interface io.opentelemetry.context.propagation.TextMapPropagator
    • inject

      public <C> void inject(io.opentelemetry.context.Context context, C carrier, io.opentelemetry.context.propagation.TextMapSetter<C> setter)
      Specified by:
      inject in interface io.opentelemetry.context.propagation.TextMapPropagator
    • extract

      public <C> io.opentelemetry.context.Context extract(io.opentelemetry.context.Context context, C carrier, io.opentelemetry.context.propagation.TextMapGetter<C> getter)
      Specified by:
      extract in interface io.opentelemetry.context.propagation.TextMapPropagator
    • toString

      public String toString()
      Overrides:
      toString in class Object