Skip to content

Commit

Permalink
Only set propagators when not provided. (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuraag Agrawal authored Sep 2, 2020
1 parent 03c2677 commit c21930b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public static void agentmain(final String agentArgs, final Instrumentation inst)
System.setProperty(
"io.opentelemetry.javaagent.shaded.io.opentelemetry.trace.spi.TracerProviderFactory",
"com.softwareaws.xray.opentelemetry.exporters.AwsTracerProviderFactory");
System.setProperty("otel.propagators", "xray,tracecontext,b3");
if (System.getProperty("otel.propagators", "").isEmpty()) {
System.setProperty("otel.propagators", "xray,tracecontext,b3");
}
OpenTelemetryAgent.agentmain(agentArgs, inst);
}
}

0 comments on commit c21930b

Please sign in to comment.