S - type of the span, usually Spanpublic abstract class AsyncReporter<S> extends zipkin2.Component implements Reporter<S>, Flushable
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)
Like
create(Sender), except you can configure settings such as the timeout. |
abstract void |
close()
Shuts down the sender thread, and increments drop metrics if there were any unsent spans.
|
static AsyncReporter<zipkin2.Span> |
create(Sender sender)
After a certain threshold, spans are drained and
sent to Zipkin
collectors. |
abstract void |
flush()
Calling this will flush any pending spans to the transport on the current thread.
|
static AsyncReporter<zipkin2.Span> |
v2(Sender sender)
Builds a reporter for Zipkin V2 spans.
|
public static AsyncReporter<zipkin2.Span> create(Sender sender)
sent to Zipkin
collectors.public static AsyncReporter<zipkin2.Span> v2(Sender sender)
public static AsyncReporter.Builder builder(Sender sender)
create(Sender), except you can configure settings such as the timeout.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 class zipkin2.ComponentCopyright © 2016–2017 OpenZipkin. All rights reserved.