Class SimpleSpanProcessor

  • All Implemented Interfaces:
    SpanProcessor, java.io.Closeable, java.lang.AutoCloseable

    public final class SimpleSpanProcessor
    extends java.lang.Object
    implements SpanProcessor
    An implementation of the SpanProcessor that converts the ReadableSpan to SpanData and passes it directly to the configured exporter.

    This processor will cause all spans to be exported directly as they finish, meaning each export request will have a single span. Most backends will not perform well with a single span per request so unless you know what you're doing, strongly consider using BatchSpanProcessor instead, including in special environments such as serverless runtimes. SimpleSpanProcessor is generally meant to for logging exporters only.

    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
      • exportUnsampledSpans

        private final boolean exportUnsampledSpans
      • isShutdown

        private final java.util.concurrent.atomic.AtomicBoolean isShutdown
    • Constructor Detail

      • SimpleSpanProcessor

        SimpleSpanProcessor​(SpanExporter spanExporter,
                            boolean exportUnsampledSpans)