Class NoopSpanExporter
- java.lang.Object
-
- io.opentelemetry.sdk.trace.export.NoopSpanExporter
-
- All Implemented Interfaces:
SpanExporter,java.io.Closeable,java.lang.AutoCloseable
final class NoopSpanExporter extends java.lang.Object implements SpanExporter
-
-
Field Summary
Fields Modifier and Type Field Description private static SpanExporterINSTANCE
-
Constructor Summary
Constructors Constructor Description NoopSpanExporter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableResultCodeexport(java.util.Collection<SpanData> spans)Called to export sampledSpans.CompletableResultCodeflush()Exports the collection of sampledSpans that have not yet been exported.(package private) static SpanExportergetInstance()CompletableResultCodeshutdown()Called whenSdkTracerProvider.shutdown()is called, if thisSpanExporteris registered to aSdkTracerProviderobject.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.sdk.trace.export.SpanExporter
close
-
-
-
-
Field Detail
-
INSTANCE
private static final SpanExporter INSTANCE
-
-
Method Detail
-
getInstance
static SpanExporter getInstance()
-
export
public CompletableResultCode export(java.util.Collection<SpanData> spans)
Description copied from interface:SpanExporterCalled to export sampledSpans. Note that export operations can be performed simultaneously depending on the type of span processor being used. However, theBatchSpanProcessorwill ensure that only one export can occur at a time.- Specified by:
exportin interfaceSpanExporter- Parameters:
spans- the collection of sampled Spans to be exported.- Returns:
- the result of the export, which is often an asynchronous operation.
-
flush
public CompletableResultCode flush()
Description copied from interface:SpanExporterExports the collection of sampledSpans that have not yet been exported. Note that export operations can be performed simultaneously depending on the type of span processor being used. However, theBatchSpanProcessorwill ensure that only one export can occur at a time.- Specified by:
flushin interfaceSpanExporter- Returns:
- the result of the flush, which is often an asynchronous operation.
-
shutdown
public CompletableResultCode shutdown()
Description copied from interface:SpanExporterCalled whenSdkTracerProvider.shutdown()is called, if thisSpanExporteris registered to aSdkTracerProviderobject.- Specified by:
shutdownin interfaceSpanExporter- Returns:
- a
CompletableResultCodewhich is completed when shutdown completes.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-