Class AsyncZipkinSpanHandler

java.lang.Object
brave.handler.SpanHandler
zipkin2.reporter.brave.ZipkinSpanHandler
zipkin2.reporter.brave.AsyncZipkinSpanHandler
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public final class AsyncZipkinSpanHandler
extends ZipkinSpanHandler
implements Closeable, Flushable
A SpanHandler that queues spans on ZipkinSpanHandler.end(brave.propagation.TraceContext, brave.handler.MutableSpan, brave.handler.SpanHandler.Cause) to bundle and send as a bulk Zipkin JSON V2 message. When the Sender is HTTP, the endpoint is usually "http://zipkinhost:9411/api/v2/spans".

Example:


 sender = URLConnectionSender.create("http://localhost:9411/api/v2/spans");
 zipkinSpanHandler = AsyncZipkinSpanHandler.create(sender); // don't forget to close!
 tracingBuilder.addSpanHandler(zipkinSpanHandler);
 
Since:
2.14
See Also:
if you need to use a different format, Tracing.Builder.addSpanHandler(SpanHandler)