@ThreadSafe public abstract class SpanExporter extends Object
SpanData
for all the spans that are part
of a distributed sampled trace (see TraceOptions.isSampled()
).Modifier and Type | Class and Description |
---|---|
static class |
SpanExporter.Handler
An abstract class that allows different tracing services to export recorded data for sampled
spans in their own format.
|
Constructor and Description |
---|
SpanExporter() |
Modifier and Type | Method and Description |
---|---|
static SpanExporter |
getNoopSpanExporter()
Returns the no-op implementation of the
ExportComponent . |
abstract void |
registerHandler(String name,
SpanExporter.Handler handler)
Registers a new service handler that is used by the library to export
SpanData for
sampled spans (see TraceOptions.isSampled() ). |
abstract void |
unregisterHandler(String name)
Unregisters the service handler with the provided name.
|
public static SpanExporter getNoopSpanExporter()
ExportComponent
.ExportComponent
.public abstract void registerHandler(String name, SpanExporter.Handler handler)
SpanData
for
sampled spans (see TraceOptions.isSampled()
).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.public abstract void unregisterHandler(String name)
name
- the name of the service handler that will be unregistered.