Skip to content

Instantly share code, notes, and snippets.

@pavolloffay
Created February 2, 2018 13:25
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 pavolloffay/bb5d426271b6cd01c0675d904e6c8980 to your computer and use it in GitHub Desktop.
Save pavolloffay/bb5d426271b6cd01c0675d904e6c8980 to your computer and use it in GitHub Desktop.
jaeger tracer bean
@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