Skip to content

Commit

Permalink
Add B3 Single and Jaeger propagators (open-telemetry#658)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergei Malafeev <[email protected]>
  • Loading branch information
Sergei Malafeev authored and mabdinur committed Jul 10, 2020
1 parent bd2caa7 commit 459aa35
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.opentelemetry.context.propagation.DefaultContextPropagators;
import io.opentelemetry.context.propagation.HttpTextFormat;
import io.opentelemetry.contrib.trace.propagation.B3Propagator;
import io.opentelemetry.contrib.trace.propagation.JaegerPropagator;
import io.opentelemetry.trace.propagation.HttpTraceContext;
import java.util.List;
import java.util.Map;
Expand All @@ -30,10 +31,19 @@
public class PropagatorsInitializer {
private static final String TRACE_CONTEXT = "tracecontext";
private static final String B3 = "b3";
private static final String B3_SINGLE = "b3single";
private static final String JAEGER = "jaeger";

private static final Map<String, HttpTextFormat> TEXTMAP_PROPAGATORS =
ImmutableMap.of(
TRACE_CONTEXT, new HttpTraceContext(), B3, B3Propagator.getMultipleHeaderPropagator());
TRACE_CONTEXT,
new HttpTraceContext(),
B3,
B3Propagator.getMultipleHeaderPropagator(),
B3_SINGLE,
B3Propagator.getSingleHeaderPropagator(),
JAEGER,
new JaegerPropagator());

/** Initialize OpenTelemetry global Propagators with propagator list, if any. */
public static void initializePropagators(List<String> propagators) {
Expand Down

0 comments on commit 459aa35

Please sign in to comment.