public final class ZipkinPublisher extends java.lang.Object implements InMemorySpanEventListener, AsyncCloseable, java.io.Closeable
Span
s to the zipkin transport.Modifier and Type | Class and Description |
---|---|
static class |
ZipkinPublisher.Builder
Builder for
ZipkinPublisher . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Blocking close method delegates to
closeAsync() . |
Completable |
closeAsync()
Attempts to close the configured
Reporter . |
Completable |
closeAsyncGracefully()
Attempts to flush and close the configured
Reporter . |
void |
onEventLogged(InMemorySpan span,
long epochMicros,
java.util.Map<java.lang.String,?> fields)
Called when an event was logged.
|
void |
onEventLogged(InMemorySpan span,
long epochMicros,
java.lang.String eventName)
Called when an event was logged.
|
void |
onSpanFinished(InMemorySpan span,
long durationMicros)
|
void |
onSpanStarted(InMemorySpan span)
Called when a span has started.
|
public void onSpanStarted(InMemorySpan span)
InMemorySpanEventListener
onSpanStarted
in interface InMemorySpanEventListener
span
- the spanpublic void onEventLogged(InMemorySpan span, long epochMicros, java.lang.String eventName)
InMemorySpanEventListener
onEventLogged
in interface InMemorySpanEventListener
span
- the span the event was associated withepochMicros
- timestamp epoch in microsecondseventName
- event namepublic void onEventLogged(InMemorySpan span, long epochMicros, java.util.Map<java.lang.String,?> fields)
InMemorySpanEventListener
onEventLogged
in interface InMemorySpanEventListener
span
- the span the event was associated withepochMicros
- timestamp epoch in microsecondsfields
- fields as a mappublic void onSpanFinished(InMemorySpan span, long durationMicros)
onSpanFinished
in interface InMemorySpanEventListener
span
- the spandurationMicros
- duration in microsecondspublic void close()
closeAsync()
.close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public Completable closeAsync()
Reporter
.closeAsync
in interface AsyncCloseable
Completable
that is completed when the close is donepublic Completable closeAsyncGracefully()
Reporter
.closeAsyncGracefully
in interface AsyncCloseable
Completable
that is completed when the flush and close is done