Class SpanExporterImpl
java.lang.Object
io.opencensus.trace.export.SpanExporter
io.opencensus.implcore.trace.export.SpanExporterImpl
Implementation of the
SpanExporter.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static classprivate static final classNested classes/interfaces inherited from class SpanExporter
SpanExporter.Handler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DerivedLongCumulativeprivate static final Loggerprivate static final DerivedLongCumulativeprivate static final DerivedLongGaugeprivate final SpanExporterImpl.Workerprivate final Thread -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSpan(RecordEventsSpanImpl span) Adds a Span to the exporting service.(package private) static SpanExporterImplConstructs aSpanExporterImplthat exports theSpanDataasynchronously.(package private) voidflush()(package private) long(package private) long(package private) long(package private) ThreadvoidregisterHandler(String name, SpanExporter.Handler handler) Registers a new service handler that is used by the library to exportSpanDatafor sampled spans (seeTraceOptions.isSampled()).(package private) voidshutdown()voidunregisterHandler(String name) Unregisters the service handler with the provided name.Methods inherited from class SpanExporter
getNoopSpanExporter
-
Field Details
-
logger
-
droppedSpans
-
pushedSpans
-
referencedSpans
-
worker
-
workerThread
-
-
Constructor Details
-
SpanExporterImpl
-
-
Method Details
-
create
Constructs aSpanExporterImplthat exports theSpanDataasynchronously.Starts a separate thread that wakes up every
scheduleDelayand exports any available spans data. If the number of buffered SpanData objects is greater thanbufferSizethen the thread wakes up sooner.- Parameters:
bufferSize- the size of the buffered span data.scheduleDelay- the maximum delay.
-
addSpan
Adds a Span to the exporting service.- Parameters:
span- theSpanto be added.
-
registerHandler
Description copied from class:SpanExporterRegisters a new service handler that is used by the library to exportSpanDatafor sampled spans (seeTraceOptions.isSampled()).- Specified by:
registerHandlerin classSpanExporter- Parameters:
name- the name of the service handler. Must be unique for each service.handler- the service handler that is called for each ended sampled span.
-
unregisterHandler
Description copied from class:SpanExporterUnregisters the service handler with the provided name.- Specified by:
unregisterHandlerin classSpanExporter- Parameters:
name- the name of the service handler that will be unregistered.
-
flush
void flush() -
shutdown
void shutdown() -
getServiceExporterThread
Thread getServiceExporterThread() -
getDroppedSpans
long getDroppedSpans() -
getReferencedSpans
long getReferencedSpans() -
getPushedSpans
long getPushedSpans()
-