openzipkin-contrib / play-zipkin-tracing

Provides distributed tracing for Play Framework and Akka using Zipkin.
Apache License 2.0
48 stars 19 forks source link

Allow nested local tracing #14

Closed takezoe closed 7 years ago

takezoe commented 7 years ago

Allow nested local tracing like:

def sample(url: String)(implicit traceData: TraceData): Future[String] = {
  tracer.trace("local-wait-1"){ implicit traceData =>
    tracer.trace("local-wait-2"){ implicit traceData =>
      Thread.sleep(300 + Random.nextInt(700))
    }
    repo.call(url)
  }
}

Results in Zipkin UI:

nested-local-trace

This pull request fixes #13