Class SpanExporter
java.lang.Object
io.opencensus.trace.export.SpanExporter
- Direct Known Subclasses:
SpanExporter.NoopSpanExporter, SpanExporterImpl
A service that is used by the library to export
SpanData for all the spans that are part
of a distributed sampled trace (see TraceOptions.isSampled()).- Since:
- 0.5
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn abstract class that allows different tracing services to export recorded data for sampled spans in their own format.private static final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SpanExporterReturns the no-op implementation of theExportComponent.abstract voidregisterHandler(String name, SpanExporter.Handler handler) Registers a new service handler that is used by the library to exportSpanDatafor sampled spans (seeTraceOptions.isSampled()).abstract voidunregisterHandler(String name) Unregisters the service handler with the provided name.
-
Field Details
-
NOOP_SPAN_EXPORTER
-
-
Constructor Details
-
SpanExporter
public SpanExporter()
-
-
Method Details
-
getNoopSpanExporter
Returns the no-op implementation of theExportComponent.- Returns:
- the no-op implementation of the
ExportComponent. - Since:
- 0.5
-
registerHandler
Registers a new service handler that is used by the library to exportSpanDatafor sampled spans (seeTraceOptions.isSampled()).- 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.- Since:
- 0.5
-
unregisterHandler
Unregisters the service handler with the provided name.- Parameters:
name- the name of the service handler that will be unregistered.- Since:
- 0.5
-