Skip to content

Instantly share code, notes, and snippets.

@giljae
Created November 28, 2018 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giljae/aa89f9c7259510932194ef02ed364ea6 to your computer and use it in GitHub Desktop.
Save giljae/aa89f9c7259510932194ef02ed364ea6 to your computer and use it in GitHub Desktop.
@Bean
public io.opentracing.Tracer jaegerTracer() {
Builder builder = new Builder("spring-boot",
new RemoteReporter(new HttpSender("http://jaeger-collector.istio-system:14268/api/traces"), 10,
65000, new Metrics(new StatsFactoryImpl(new NullStatsReporter()))),
new ConstSampler(true))
.registerInjector(Builtin.HTTP_HEADERS, new B3TextMapCodec())
.registerExtractor(Builtin.HTTP_HEADERS, new B3TextMapCodec());
return builder.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment