public final class HttpZipkinSpanReporter extends Object implements ZipkinSpanReporter, Flushable, Closeable
POST /spans endpoint.| Constructor and Description |
|---|
HttpZipkinSpanReporter(org.springframework.web.client.RestTemplate restTemplate,
String baseUrl,
int flushInterval,
SpanMetricReporter spanMetricReporter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Blocks until in-flight spans are sent and drops any that are left pending.
|
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(org.springframework.web.client.RestTemplate restTemplate,
String baseUrl,
int flushInterval,
SpanMetricReporter spanMetricReporter)
restTemplate - RestTemplate used for sending requests to ZipkinbaseUrl - URL of the zipkin query server instance. Like: http://localhost:9411/flushInterval - in seconds. 0 implies spans are flushed externally.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 © 2017 Pivotal Software, Inc.. All rights reserved.