@Test public void testToHeader() { SpanContext context = new SpanContext( new TraceId(BigInteger.valueOf(10)), new SpanId(20), new TraceOptions(3)); assertThat(SpanContextFactory.toHeader(context)) .isEqualTo("0000000000000000000000000000000a/20;o=3"); }
public static String toHeader(SpanContext context) { StringBuilder builder = new StringBuilder() .append(context.getTraceId().getApiString()) .append('/') .append(context.getSpanId().getApiString()) .append(";o=") .append(context.getTraceOptions().getOptionsMask()); return builder.toString(); }
SpanContextFactory { public static String toHeader(SpanContext context) { StringBuilder builder = new StringBuilder() .append(context.getTraceId().getApiString()) .append('/') .append(context.getSpanId().getApiString()) .append(";o=") .append(context.getTraceOptions().getOptionsMask()); return builder.toString(); } }
SpanContextFactory { public static String toHeader(SpanContext context) { StringBuilder builder = new StringBuilder() .append(context.getTraceId().getApiString()) .append('/') .append(context.getSpanId().getApiString()) .append(";o=") .append(context.getTraceOptions().getOptionsMask()); return builder.toString(); } SpanContextFactory(TraceOptionsFactory traceOptionsFactory);  SpanContextFactory(TraceOptionsFactory traceOptionsFactory,
      IdFactory<TraceId> traceIdFactory, IdFactory<SpanId> spanIdFactory); }
SpanContextFactory { public static String toHeader(SpanContext context) { StringBuilder builder = new StringBuilder() .append(context.getTraceId().getApiString()) .append('/') .append(context.getSpanId().getApiString()) .append(";o=") .append(context.getTraceOptions().getOptionsMask()); return builder.toString(); } SpanContextFactory(TraceOptionsFactory traceOptionsFactory);  SpanContextFactory(TraceOptionsFactory traceOptionsFactory,
      IdFactory<TraceId> traceIdFactory, IdFactory<SpanId> spanIdFactory); static String headerKey(); SpanContext childContext(SpanContext parentContext); SpanContext initialContext(); SpanContext fromHeader(String header); static String toHeader(SpanContext context); }
SpanContextFactory { public static String toHeader(SpanContext context) { StringBuilder builder = new StringBuilder() .append(context.getTraceId().getApiString()) .append('/') .append(context.getSpanId().getApiString()) .append(";o=") .append(context.getTraceOptions().getOptionsMask()); return builder.toString(); } SpanContextFactory(TraceOptionsFactory traceOptionsFactory);  SpanContextFactory(TraceOptionsFactory traceOptionsFactory,
      IdFactory<TraceId> traceIdFactory, IdFactory<SpanId> spanIdFactory); static String headerKey(); SpanContext childContext(SpanContext parentContext); SpanContext initialContext(); SpanContext fromHeader(String header); static String toHeader(SpanContext context);  }