Class ZipkinPublisher
- java.lang.Object
-
- io.servicetalk.opentracing.zipkin.publisher.ZipkinPublisher
-
- All Implemented Interfaces:
AsyncCloseable,InMemorySpanEventListener,java.io.Closeable,java.lang.AutoCloseable
public final class ZipkinPublisher extends java.lang.Object implements InMemorySpanEventListener, AsyncCloseable, java.io.Closeable
A publisher ofSpans to the zipkin transport.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZipkinPublisher.BuilderBuilder forZipkinPublisher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Blocking close method delegates tocloseAsync().CompletablecloseAsync()Attempts to close the configuredReporter.CompletablecloseAsyncGracefully()Attempts to flush and close the configuredReporter.voidonEventLogged(InMemorySpan span, long epochMicros, java.lang.String eventName)Called when an event was logged.voidonEventLogged(InMemorySpan span, long epochMicros, java.util.Map<java.lang.String,?> fields)Called when an event was logged.voidonSpanFinished(InMemorySpan span, long durationMicros)voidonSpanStarted(InMemorySpan span)Called when a span has started.
-
-
-
Method Detail
-
onSpanStarted
public void onSpanStarted(InMemorySpan span)
Description copied from interface:InMemorySpanEventListenerCalled when a span has started.- Specified by:
onSpanStartedin interfaceInMemorySpanEventListener- Parameters:
span- the span
-
onEventLogged
public void onEventLogged(InMemorySpan span, long epochMicros, java.lang.String eventName)
Description copied from interface:InMemorySpanEventListenerCalled when an event was logged.- Specified by:
onEventLoggedin interfaceInMemorySpanEventListener- Parameters:
span- the span the event was associated withepochMicros- timestamp epoch in microsecondseventName- event name
-
onEventLogged
public void onEventLogged(InMemorySpan span, long epochMicros, java.util.Map<java.lang.String,?> fields)
Description copied from interface:InMemorySpanEventListenerCalled when an event was logged.- Specified by:
onEventLoggedin interfaceInMemorySpanEventListener- Parameters:
span- the span the event was associated withepochMicros- timestamp epoch in microsecondsfields- fields as a map
-
onSpanFinished
public void onSpanFinished(InMemorySpan span, long durationMicros)
- Specified by:
onSpanFinishedin interfaceInMemorySpanEventListener- Parameters:
span- the spandurationMicros- duration in microseconds
-
close
public void close()
Blocking close method delegates tocloseAsync().- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
closeAsync
public Completable closeAsync()
Attempts to close the configuredReporter.- Specified by:
closeAsyncin interfaceAsyncCloseable- Returns:
- a
Completablethat is completed when the close is done
-
closeAsyncGracefully
public Completable closeAsyncGracefully()
Attempts to flush and close the configuredReporter.- Specified by:
closeAsyncGracefullyin interfaceAsyncCloseable- Returns:
- a
Completablethat is completed when the flush and close is done
-
-