Class ZipkinPublisher
java.lang.Object
io.servicetalk.opentracing.zipkin.publisher.ZipkinPublisher
- All Implemented Interfaces:
AsyncCloseable
,InMemorySpanEventListener
,Closeable
,AutoCloseable
public final class ZipkinPublisher
extends Object
implements InMemorySpanEventListener, AsyncCloseable, Closeable
A publisher of
Span
s to the zipkin transport.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Blocking close method delegates tocloseAsync()
.Attempts to close the configuredReporter
.Attempts to flush and close the configuredReporter
.void
onEventLogged
(InMemorySpan span, long epochMicros, String eventName) Called when an event was logged.void
onEventLogged
(InMemorySpan span, long epochMicros, Map<String, ?> fields) Called when an event was logged.void
onSpanFinished
(InMemorySpan span, long durationMicros) void
onSpanStarted
(InMemorySpan span) Called when a span has started.
-
Method Details
-
onSpanStarted
Description copied from interface:InMemorySpanEventListener
Called when a span has started.- Specified by:
onSpanStarted
in interfaceInMemorySpanEventListener
- Parameters:
span
- the span
-
onEventLogged
Description copied from interface:InMemorySpanEventListener
Called when an event was logged.- Specified by:
onEventLogged
in interfaceInMemorySpanEventListener
- Parameters:
span
- the span the event was associated withepochMicros
- timestamp epoch in microsecondseventName
- event name
-
onEventLogged
Description copied from interface:InMemorySpanEventListener
Called when an event was logged.- Specified by:
onEventLogged
in interfaceInMemorySpanEventListener
- Parameters:
span
- the span the event was associated withepochMicros
- timestamp epoch in microsecondsfields
- fields as a map
-
onSpanFinished
- Specified by:
onSpanFinished
in interfaceInMemorySpanEventListener
- Parameters:
span
- the spandurationMicros
- duration in microseconds
-
close
public void close()Blocking close method delegates tocloseAsync()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
closeAsync
Attempts to close the configuredReporter
.- Specified by:
closeAsync
in interfaceAsyncCloseable
- Returns:
- a
Completable
that is completed when the close is done
-
closeAsyncGracefully
Attempts to flush and close the configuredReporter
.- Specified by:
closeAsyncGracefully
in interfaceAsyncCloseable
- Returns:
- a
Completable
that is completed when the flush and close is done
-