TraceContext extends SamplingFlags { @Override public String toString() { boolean traceHi = traceIdHigh != 0; char[] result = new char[((traceHi ? 3 : 2) * 16) + 1]; int pos = 0; if (traceHi) { writeHexLong(result, pos, traceIdHigh); pos += 16; } writeHexLong(result, pos, traceId); pos += 16; result[pos++] = '/'; writeHexLong(result, pos, spanId); return new String(result); } TraceContext(
    int flags,
    long traceIdHigh,
    long traceId,
    long localRootId,
    long parentId,
    long spanId,
    List<Object> extraList
  ); static Builder newBuilder(); long traceIdHigh(); long traceId(); long localRootId(); boolean isLocalRoot(); @Nullable final Long parentId(); long parentIdAsLong(); long spanId(); boolean shared(); List<Object> extra(); @Nullable T findExtra(Class<T> type); Builder toBuilder(); String traceIdString(); @Nullable String parentIdString(); @Nullable String localRootIdString(); String spanIdString(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testToString() { TraceContext context = TraceContext.newBuilder().traceIdHigh(333L).traceId(444L).spanId(3).parentId(2L).build(); assertThat(context.toString()) .isEqualTo("000000000000014d00000000000001bc/0000000000000003"); }