Search in sources :

Example 1 with RateLimitingSampler

use of io.jaegertracing.internal.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 InMemoryMetricsFactory()));
    assertTrue(sampler instanceof RateLimitingSampler);
}
Also used : RateLimitingSampler(io.jaegertracing.internal.samplers.RateLimitingSampler) Metrics(io.jaegertracing.internal.metrics.Metrics) InMemoryMetricsFactory(io.jaegertracing.internal.metrics.InMemoryMetricsFactory) Sampler(io.jaegertracing.spi.Sampler) RateLimitingSampler(io.jaegertracing.internal.samplers.RateLimitingSampler) ConstSampler(io.jaegertracing.internal.samplers.ConstSampler) ProbabilisticSampler(io.jaegertracing.internal.samplers.ProbabilisticSampler) SamplerConfiguration(io.jaegertracing.Configuration.SamplerConfiguration) Test(org.junit.Test)

Aggregations

SamplerConfiguration (io.jaegertracing.Configuration.SamplerConfiguration)1 InMemoryMetricsFactory (io.jaegertracing.internal.metrics.InMemoryMetricsFactory)1 Metrics (io.jaegertracing.internal.metrics.Metrics)1 ConstSampler (io.jaegertracing.internal.samplers.ConstSampler)1 ProbabilisticSampler (io.jaegertracing.internal.samplers.ProbabilisticSampler)1 RateLimitingSampler (io.jaegertracing.internal.samplers.RateLimitingSampler)1 Sampler (io.jaegertracing.spi.Sampler)1 Test (org.junit.Test)1