Interface SpanProcessor

    • Method Detail

      • onStart

        void onStart​(Context parentContext,
                     ReadWriteSpan span)
        Called when a Span is started, if the Span.isRecording() returns true.

        This method is called synchronously on the execution thread, should not throw or block the execution thread.

        Parameters:
        parentContext - the parent Context of the span that just started.
        span - the Span that just started.
      • isStartRequired

        boolean isStartRequired()
        Returns true if this SpanProcessor requires start events.
        Returns:
        true if this SpanProcessor requires start events.
      • onEnd

        void onEnd​(ReadableSpan span)
        Called when a Span is ended, if the Span.isRecording() returns true.

        This method is called synchronously on the execution thread, should not throw or block the execution thread.

        Parameters:
        span - the Span that just ended.
      • isEndRequired

        boolean isEndRequired()
        Returns true if this SpanProcessor requires end events.
        Returns:
        true if this SpanProcessor requires end events.
      • shutdown

        default CompletableResultCode shutdown()
        Processes all span events that have not yet been processed and closes used resources.
        Returns:
        a CompletableResultCode which completes when shutdown is finished.
      • forceFlush

        default CompletableResultCode forceFlush()
        Processes all span events that have not yet been processed.
        Returns:
        a CompletableResultCode which completes when currently queued spans are finished processing.
      • close

        default void close()
        Closes this SpanProcessor after processing any remaining spans, releasing any resources.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable