@Override public int messageSizeInBytes(List<byte[]> encodedSpans) { return encoding().listSizeInBytes(encodedSpans); }
public Traced() { super(Tracing.newBuilder() .spanReporter(AsyncReporter.create(new NoopSender())) .build()); } }
public Unsampled() { super(Tracing.newBuilder() .sampler(Sampler.NEVER_SAMPLE) .spanReporter(AsyncReporter.create(new NoopSender())) .build()); } }
public Traced128() { super(Tracing.newBuilder() .traceId128Bit(true) .spanReporter(AsyncReporter.create(new NoopSender())) .build()); } }
@Override public int messageSizeInBytes(int encodedSizeInBytes) { return encoding().listSizeInBytes(encodedSizeInBytes); }
public TracedExtra() { super(Tracing.newBuilder() .propagationFactory(ExtraFieldPropagation.newFactoryBuilder(B3Propagation.FACTORY) .addField("x-vcap-request-id") .addPrefixedFields("baggage-", Arrays.asList("country-code", "user-id")) .build() ) .spanReporter(AsyncReporter.create(new NoopSender())) .build()); } }
public OnlySampledLocal() { super(Tracing.newBuilder() .addFinishedSpanHandler(new FinishedSpanHandler() { @Override public boolean handle(TraceContext context, MutableSpan span) { return true; } @Override public boolean alwaysSampleLocal() { return true; } }) .sampler(Sampler.NEVER_SAMPLE) .spanReporter(AsyncReporter.create(new NoopSender())) .build()); } }
public TracedCorrelated() { super(Tracing.newBuilder() .currentTraceContext(ThreadLocalCurrentTraceContext.newBuilder() // intentionally added twice to test overhead of multiple correlations .addScopeDecorator(ThreadContextScopeDecorator.create()) .addScopeDecorator(ThreadContextScopeDecorator.create()) .build()) .spanReporter(AsyncReporter.create(new NoopSender())) .build()); } }