You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

A 128-bit trace ID is when X-B3-TraceId has 32 hex characters as opposed to 16. For example, X-B3-TraceId: 463ac35c9f6413ad48485a3953bb6124.

Here are the status options for 128bit X-B3-TraceId:

  • unsupported: 32 character trace ids will break the library
  • downgrade: Read 32 character trace ids by throwing away the high bits (any characters left of 16 characters). This effectively downgrades the ID to 64 bits.
  • transparent: Pass X-B3-TraceId through the system without interpreting it.
  • supported: Can start traces with 128-bit trace IDs, propagates and reports them as 128-bits
  • epoch128: Can start traces with 128-bit trace IDs which are prefixed with epoch seconds

This is a list of zipkin libraries and their status in supporting 128-bit trace IDs

libraryversionstatusnotes
zipkin-js0.5+supportednew Tracer({..., traceId128Bit: true})
pyramid_zipkin0.16+downgrade
brave3.15+/4.9+supported/epoch128https://github.com/openzipkin/brave/tree/master/brave-core#128-bit-trace-ids
spring-cloud-sleuth1.0.11+/1.2.6+supported/epoch128set spring.sleuth.traceId128=true
finagle0.40+downgrade
zipkin-ruby
unsupporteddepends on twitter/finagle#565
ZipkinTracerModule3.2+supportedCreate128BitTraceId(true)
zipkin-go-opentracing0.2+supportedhttps://godoc.org/github.com/openzipkin/zipkin-go-opentracing#TraceID128Bit
akka-tracing0.5.2+downgrade
wingtips0.11.2+transparent
jaeger0.10+downgrade
zipkin4net0.4+supported

epoch128

When a trace ID is 128-bits and the first 32 bits are epoch seconds, the ID can be translated into
an Amazon Web Services ID. Tracers who do this can tunnel through ELBs, for example.

Here's an example implementation

  static long nextTraceIdHigh(Random prng) {
    long epochSeconds = System.currentTimeMillis() / 1000;
    int random = prng.nextInt();
    return (epochSeconds & 0xffffffffL) << 32
        |  (random & 0xffffffffL);
  }

See openzipkin/zipkin#1754

  • No labels