java.lang.Object
org.eclipse.microprofile.telemetry.tracing.tck.rest.TestPropagator
All Implemented Interfaces:
io.opentelemetry.context.propagation.TextMapPropagator

public class TestPropagator extends Object implements io.opentelemetry.context.propagation.TextMapPropagator
A basic propagator for span context and baggage

Span information is passed in the TEST-SPAN key with format traceId;spanId;flags;statekey1=value,statekey2=value

Baggage information is passed in the TEST-BAGGAGE key with format key,value,metadata;key2,value,metadata;key3,value,metadata;...

All individual values are urlencoded to make parsing easy (don't have to worry about values containing separator characters)

  • Field Details

  • Constructor Details

    • TestPropagator

      public TestPropagator()
  • Method Details

    • fields

      public Collection<String> fields()
      Specified by:
      fields 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
    • 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