Search in sources :

Example 6 with SamplerConfiguration

use of com.uber.jaeger.Configuration.SamplerConfiguration in project jaeger-client-java by jaegertracing.

the class ConfigurationTest method testProbabilisticSampler.

@Test
public void testProbabilisticSampler() {
    SamplerConfiguration samplerConfiguration = new SamplerConfiguration().withType(ProbabilisticSampler.TYPE);
    Sampler sampler = samplerConfiguration.createSampler("name", new Metrics(new StatsFactoryImpl(new NullStatsReporter())));
    assertTrue(sampler instanceof ProbabilisticSampler);
}
Also used : Metrics(com.uber.jaeger.metrics.Metrics) NullStatsReporter(com.uber.jaeger.metrics.NullStatsReporter) RateLimitingSampler(com.uber.jaeger.samplers.RateLimitingSampler) Sampler(com.uber.jaeger.samplers.Sampler) ConstSampler(com.uber.jaeger.samplers.ConstSampler) ProbabilisticSampler(com.uber.jaeger.samplers.ProbabilisticSampler) SamplerConfiguration(com.uber.jaeger.Configuration.SamplerConfiguration) StatsFactoryImpl(com.uber.jaeger.metrics.StatsFactoryImpl) ProbabilisticSampler(com.uber.jaeger.samplers.ProbabilisticSampler) Test(org.junit.Test)

Aggregations

SamplerConfiguration (com.uber.jaeger.Configuration.SamplerConfiguration)6 Test (org.junit.Test)6 Metrics (com.uber.jaeger.metrics.Metrics)3 NullStatsReporter (com.uber.jaeger.metrics.NullStatsReporter)3 StatsFactoryImpl (com.uber.jaeger.metrics.StatsFactoryImpl)3 ConstSampler (com.uber.jaeger.samplers.ConstSampler)3 ProbabilisticSampler (com.uber.jaeger.samplers.ProbabilisticSampler)3 RateLimitingSampler (com.uber.jaeger.samplers.RateLimitingSampler)3 Sampler (com.uber.jaeger.samplers.Sampler)3 ReporterConfiguration (com.uber.jaeger.Configuration.ReporterConfiguration)1