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 ofSpan
s to the zipkin transport.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ZipkinPublisher.Builder
Builder forZipkinPublisher
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Blocking close method delegates tocloseAsync()
.Completable
closeAsync()
Attempts to close the configuredReporter
.Completable
closeAsyncGracefully()
Attempts to flush and close the configuredReporter
.void
onEventLogged(InMemorySpan span, long epochMicros, java.lang.String eventName)
Called when an event was logged.void
onEventLogged(InMemorySpan span, long epochMicros, java.util.Map<java.lang.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 Detail
-
onSpanStarted
public void onSpanStarted(InMemorySpan span)
Description copied from interface:InMemorySpanEventListener
Called when a span has started.- Specified by:
onSpanStarted
in interfaceInMemorySpanEventListener
- Parameters:
span
- the span
-
onEventLogged
public void onEventLogged(InMemorySpan span, long epochMicros, java.lang.String eventName)
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
public void onEventLogged(InMemorySpan span, long epochMicros, java.util.Map<java.lang.String,?> fields)
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
public void onSpanFinished(InMemorySpan span, long durationMicros)
- 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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
closeAsync
public Completable closeAsync()
Attempts to close the configuredReporter
.- Specified by:
closeAsync
in interfaceAsyncCloseable
- Returns:
- a
Completable
that is completed when the close is done
-
closeAsyncGracefully
public Completable 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
-
-