use of com.uber.jaeger.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class TracerTest method testAsChildOfAcceptNull.
@Test
public void testAsChildOfAcceptNull() {
tracer = new Tracer.Builder("foo", new InMemoryReporter(), new ConstSampler(true)).build();
Span span = (Span) tracer.buildSpan("foo").asChildOf((Span) null).start();
span.finish();
assertTrue(span.getReferences().isEmpty());
span = (Span) tracer.buildSpan("foo").asChildOf((io.opentracing.SpanContext) null).start();
span.finish();
assertTrue(span.getReferences().isEmpty());
}
use of com.uber.jaeger.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class BaggageSetterTest method setUp.
@Before
public void setUp() throws Exception {
metricsFactory = new InMemoryMetricsFactory();
reporter = new InMemoryReporter();
metrics = new Metrics(metricsFactory);
mgr = mock(DefaultBaggageRestrictionManager.class);
setter = new BaggageSetter(mgr, metrics);
tracer = new Tracer.Builder(SERVICE, reporter, new ConstSampler(true)).withMetrics(metrics).build();
span = (Span) tracer.buildSpan("some-operation").startManual();
}
use of com.uber.jaeger.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class InMemoryMetricsFactoryTest method emptyValueForTag.
@Test
public void emptyValueForTag() {
InMemoryMetricsFactory metricsFactory = new InMemoryMetricsFactory();
Tracer tracer = new Tracer.Builder("metricsFactoryTest", new InMemoryReporter(), new ConstSampler(true)).withMetrics(new Metrics(metricsFactory)).build();
tracer.buildSpan("theoperation").start();
assertEquals(-1, metricsFactory.getCounter("jaeger:started_spans", "sampled"));
assertEquals(-1, metricsFactory.getCounter("jaeger:started_spans", ""));
}
use of com.uber.jaeger.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class EndToEndBehaviorResourceTest method setUp.
@Before
public void setUp() throws Exception {
reporter = new InMemoryReporter();
Tracer tracer = new com.uber.jaeger.Tracer.Builder("crossdock-java", reporter, new ConstSampler(true)).build();
Map<String, Tracer> tracers = new HashMap<>();
tracers.put("const", tracer);
resource = new EndToEndBehaviorResource(new EndToEndBehavior(tracers));
}
use of com.uber.jaeger.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class JerseyServerFilterTest method configure.
@Override
protected Application configure() {
reporter = new InMemoryReporter();
Tracer tracer = new Tracer.Builder("world service", reporter, new ConstSampler(true)).build();
ResourceConfig resourceConfig = new ResourceConfig(HelloResource.class, StormlordResource.class);
TracingUtils.setTracer(tracer);
undertest = new JerseyServerFilter(tracer, TracingUtils.getTraceContext());
resourceConfig.register(undertest);
return resourceConfig;
}
Aggregations