Interface SpanProcessor

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default io.opentelemetry.sdk.common.CompletableResultCode forceFlush()
      Processes all span events that have not yet been processed.
      boolean isEndRequired()
      Returns true if this SpanProcessor requires end events.
      boolean isStartRequired()
      Returns true if this SpanProcessor requires start events.
      void onEnd​(ReadableSpan span)
      Called when a Span is ended, if the Span.isRecording() returns true.
      void onStart​(io.opentelemetry.context.Context parentContext, ReadWriteSpan span)
      Called when a Span is started, if the Span.isRecording() returns true.
      default io.opentelemetry.sdk.common.CompletableResultCode shutdown()
      Processes all span events that have not yet been processed and closes used resources.
    • Method Detail

      • onStart

        void onStart​(io.opentelemetry.context.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 ReadableSpan 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 ReadableSpan that just ended.
      • isEndRequired

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

        default io.opentelemetry.sdk.common.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 io.opentelemetry.sdk.common.CompletableResultCode forceFlush()
        Processes all span events that have not yet been processed.
        Returns:
        a CompletableResultCode which completes when currently queued spans are finished processing.