Search in sources :

Example 1 with RemoteControlledSampler

use of io.jaegertracing.internal.samplers.RemoteControlledSampler in project jaeger-client-java by jaegertracing.

the class EndToEndBehavior method getRemoteTracer.

private Tracer getRemoteTracer(Metrics metrics, Reporter reporter, String serviceName, String samplingHostPort) {
    Sampler initialSampler = new ProbabilisticSampler(1.0);
    HttpSamplingManager manager = new HttpSamplingManager(samplingHostPort);
    RemoteControlledSampler remoteSampler = new RemoteControlledSampler.Builder(serviceName).withSamplingManager(manager).withInitialSampler(initialSampler).withMetrics(metrics).withPollingInterval(5000).build();
    return new JaegerTracer.Builder(serviceName).withReporter(reporter).withSampler(remoteSampler).build();
}
Also used : HttpSamplingManager(io.jaegertracing.internal.samplers.HttpSamplingManager) ConstSampler(io.jaegertracing.internal.samplers.ConstSampler) ProbabilisticSampler(io.jaegertracing.internal.samplers.ProbabilisticSampler) RemoteControlledSampler(io.jaegertracing.internal.samplers.RemoteControlledSampler) Sampler(io.jaegertracing.spi.Sampler) ProbabilisticSampler(io.jaegertracing.internal.samplers.ProbabilisticSampler) RemoteControlledSampler(io.jaegertracing.internal.samplers.RemoteControlledSampler) JaegerTracer(io.jaegertracing.internal.JaegerTracer)

Aggregations

JaegerTracer (io.jaegertracing.internal.JaegerTracer)1 ConstSampler (io.jaegertracing.internal.samplers.ConstSampler)1 HttpSamplingManager (io.jaegertracing.internal.samplers.HttpSamplingManager)1 ProbabilisticSampler (io.jaegertracing.internal.samplers.ProbabilisticSampler)1 RemoteControlledSampler (io.jaegertracing.internal.samplers.RemoteControlledSampler)1 Sampler (io.jaegertracing.spi.Sampler)1