public final class HttpZipkinSpanReporter extends Object implements ZipkinSpanReporter, Flushable, Closeable
POST /spans endpoint.| Constructor and Description |
|---|
HttpZipkinSpanReporter(String baseUrl,
int flushInterval,
boolean compressionEnabled,
SpanMetricReporter spanMetricReporter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Requests a cease of delivery.
|
void |
flush()
Calling this will flush any pending spans to the http transport on the current thread.
|
void |
report(zipkin.Span span)
Queues the span for collection, or drops it if the queue is full.
|
public HttpZipkinSpanReporter(String baseUrl, int flushInterval, boolean compressionEnabled, SpanMetricReporter spanMetricReporter)
baseUrl - URL of the zipkin query server instance. Like: http://localhost:9411/flushInterval - in seconds. 0 implies spans are flushed externally.compressionEnabled - compress spans using gzip before posting to the zipkin server.spanMetricReporter - service to count number of accepted / dropped spanspublic void report(zipkin.Span span)
report in interface ZipkinSpanReporterspan - Span, should not be null.public void flush()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2016 Pivotal Software, Inc.. All rights reserved.