Search in sources :

Example 1 with RateLimitingSampler

use of com.uber.jaeger.samplers.RateLimitingSampler in project jaeger-client-java by jaegertracing.

the class ConfigurationTest method testRateLimitingSampler.

@Test
public void testRateLimitingSampler() {
    SamplerConfiguration samplerConfiguration = new SamplerConfiguration().withType(RateLimitingSampler.TYPE);
    Sampler sampler = samplerConfiguration.createSampler("name", new Metrics(new StatsFactoryImpl(new NullStatsReporter())));
    assertTrue(sampler instanceof RateLimitingSampler);
}
Also used : RateLimitingSampler(com.uber.jaeger.samplers.RateLimitingSampler) 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) Test(org.junit.Test)

Aggregations

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