@Test public void testSpanContextNotSampled() { String expectedOperation = "fry"; JaegerSpan first = tracer.buildSpan(expectedOperation).start(); tracer.buildSpan(expectedOperation).asChildOf((first.context()).withFlags((byte) 0)).start(); assertEquals(1, metricsFactory.getCounter("jaeger_tracer_started_spans", "sampled=y")); assertEquals(1, metricsFactory.getCounter("jaeger_tracer_started_spans", "sampled=n")); assertEquals(1, metricsFactory.getCounter("jaeger_tracer_traces", "sampled=y,state=started")); assertEquals(0, metricsFactory.getCounter("jaeger_tracer_traces", "sampled=n,state=started")); }
@Override public JaegerTracer.SpanBuilder buildSpan(String operationName) { return objectFactory.createSpanBuilder(this, operationName); }
JaegerTracer implements Tracer, Closeable { @Override public JaegerTracer.SpanBuilder buildSpan(String operationName) { return objectFactory.createSpanBuilder(this, operationName); } }
JaegerTracer implements Tracer, Closeable { @Override public JaegerTracer.SpanBuilder buildSpan(String operationName) { return objectFactory.createSpanBuilder(this, operationName); } protected  JaegerTracer(JaegerTracer.Builder builder); }
JaegerTracer implements Tracer, Closeable { @Override public JaegerTracer.SpanBuilder buildSpan(String operationName) { return objectFactory.createSpanBuilder(this, operationName); } protected  JaegerTracer(JaegerTracer.Builder builder); String getVersion(); Metrics getMetrics(); String getServiceName(); Map<String, ?> tags(); int getIpv4(); @Override ScopeManager scopeManager(); @Override Span activeSpan(); @Override JaegerTracer.SpanBuilder buildSpan(String operationName); @Override void inject(SpanContext spanContext, Format<T> format, T carrier); @Override JaegerSpanContext extract(Format<T> format, T carrier); @Override void close(); static String getVersionFromProperties(); boolean isUseTraceId128Bit(); @Override Scope activateSpan(Span span); }
JaegerTracer implements Tracer, Closeable { @Override public JaegerTracer.SpanBuilder buildSpan(String operationName) { return objectFactory.createSpanBuilder(this, operationName); } protected  JaegerTracer(JaegerTracer.Builder builder); String getVersion(); Metrics getMetrics(); String getServiceName(); Map<String, ?> tags(); int getIpv4(); @Override ScopeManager scopeManager(); @Override Span activeSpan(); @Override JaegerTracer.SpanBuilder buildSpan(String operationName); @Override void inject(SpanContext spanContext, Format<T> format, T carrier); @Override JaegerSpanContext extract(Format<T> format, T carrier); @Override void close(); static String getVersionFromProperties(); boolean isUseTraceId128Bit(); @Override Scope activateSpan(Span span);  }