Skip to content

Instantly share code, notes, and snippets.

@jpkrohling
Created March 19, 2018 09:04
Show Gist options
  • Save jpkrohling/48cf9af6aa0f096706b99d4970353ad5 to your computer and use it in GitHub Desktop.
Save jpkrohling/48cf9af6aa0f096706b99d4970353ad5 to your computer and use it in GitHub Desktop.
import com.uber.jaeger.Configuration;
import com.uber.jaeger.Tracer;
import com.uber.jaeger.samplers.ConstSampler;
import javax.inject.Provider;
public class TracerProvider implements Provider<Tracer> {
@Override
public Tracer get() {
return new Configuration("play-java-starter-example")
.withReporter(
new Configuration.ReporterConfiguration()
.withLogSpans(true)
)
.withSampler(
new Configuration.SamplerConfiguration()
.withType(ConstSampler.TYPE)
.withParam(1)
)
.getTracerBuilder()
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment