Created
March 19, 2018 09:04
-
-
Save jpkrohling/48cf9af6aa0f096706b99d4970353ad5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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