Class for a trace data take over between requests.
Basic trait for Zipkin tracing at Play.
Basic trait for Zipkin tracing at Play.
You need a Tracing and an ExecutionContext used by a tracer report data. Here's an example setup that sends trace data to Zipkin over http.
class ZipkinTraceService @Inject() ( actorSystem: ActorSystem) extends ZipkinTraceServiceLike { // the execution context provided by and used for tracing purposes implicit val executionContext: ExecutionContext = actorSystem.dispatchers.lookup("zipkin-trace-context") // configure a reporter, now create a tracing component val tracing = Tracing.newBuilder() .localServiceName("example") .reporter(AsyncReporter .builder(OkHttpSender.create("http://localhost:9411/api/v1/spans")) .build() ) .sampler(Sampler.create(0.1F)) .build() }
Class for a trace data take over between requests.
the present span