openzipkin / openzipkin.github.io

content for https://zipkin.io
https://zipkin.io
Apache License 2.0
39 stars 64 forks source link

Track libraries that properly address span timestamp and duration #49

Closed codefromthecrypt closed 5 years ago

codefromthecrypt commented 7 years ago

Span.timestamp is problematic when misreported, or never reported. This issue will track known active zipkin libraries towards effective timestamp practice.

Summary of timestamp and duration logic

From http://zipkin.io/pages/instrumenting.html, the simplest logic for v1 format is:

unless (logging "sr" in an shared span) {
 set Span.timestamp and duration (both in microseconds)
}

When a server joins a span from incoming headers, it is sharing the span with the client (who generated the headers). In that case, the server shouldn't set Span.timestamp or duration since its view of the span is later and shorter than the client.

Otherwise, you should set timestamp and duration on finished spans. That makes sure indexing and duration queries work best.

Note v2 format includes a shared flag which is used to help with this problem in v2 format, you always set timestamp and duration.

Status

Here are the status options for Span.timestamp/duration:

This is a list of zipkin libraries and their status in supporting Span.timestamp/duration

library version status notes
zipkin-js 0.4+ supported
py_zipkin 0.5+ supported
brave 3.13+ supported
spring-cloud-sleuth 1.0.11+ supported
finagle versions supporting zipkin-finagle supported At the current time, zipkin-finagle must be used in order to report timestamps properly
zipkin-ruby 0.12+ supported
ZipkinTracerModule
zipkin-go-opentracing 0.2.1+ supported
zipkin4net 0.3+ supported
akka-tracing
wingtips
jaeger

See #46

codefromthecrypt commented 7 years ago

here's the first step towards this https://github.com/openzipkin/brave/pull/243

codefromthecrypt commented 5 years ago

tracking moved here https://cwiki.apache.org/confluence/display/ZIPKIN/Timestamps+in+shared+spans