S - type of the span, usually Spanpublic abstract class AsyncReporter<S> extends Object implements Reporter<S>, Flushable, zipkin.Component
flush(). By doing so, callers are protected
from latency or exceptions possible when exporting spans out of process.
Spans are bundled into messages based on size in bytes or a timeout, whichever happens first.
| Modifier and Type | Class and Description |
|---|---|
static class |
AsyncReporter.Builder |
| Constructor and Description |
|---|
AsyncReporter() |
| Modifier and Type | Method and Description |
|---|---|
static AsyncReporter.Builder |
builder(Sender sender)
After a certain threshold, spans are drained and
sent
to Zipkin collectors. |
abstract void |
close()
Shuts down the sender thread, and increments drop metrics if there were any unsent spans.
|
abstract void |
flush()
Calling this will flush any pending spans to the transport on the current thread.
|
public static AsyncReporter.Builder builder(Sender sender)
sent
to Zipkin collectors.public abstract void flush()
Note: If you set message timeout to zero, you
must call this externally as otherwise spans will never be sent.
flush in interface FlushableIllegalStateException - if closedpublic abstract void close()
close in interface Closeableclose in interface AutoCloseableclose in interface zipkin.ComponentCopyright © 2016–2017 OpenZipkin. All rights reserved.