Package io.opencensus.trace.export
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 class
An 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 SpanExporter
Returns the no-op implementation of theExportComponent
.abstract void
registerHandler
(String name, SpanExporter.Handler handler) Registers a new service handler that is used by the library to exportSpanData
for sampled spans (seeTraceOptions.isSampled()
).abstract void
unregisterHandler
(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 exportSpanData
for 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
-