An implementation of the SpanProcessor that converts the Span to ReadableSpan and passes it to the configured exporter.

Only spans that are sampled are converted.

NOTE: This SpanProcessor exports every ended span individually instead of batching spans together, which causes significant performance overhead with most exporters. For production use, please consider using the BatchSpanProcessor instead.

Implements

Constructors

Methods

  • Forces to export all finished spans

    Returns Promise<void>

  • Called when a ReadableSpan is ended, if the span.isRecording() returns true.

    Parameters

    Returns void

  • Called when a Span is started, if the span.isRecording() returns true.

    Parameters

    • _span: Span

      the Span that just started.

    • _parentContext: Context

    Returns void

  • Shuts down the processor. Called when SDK is shut down. This is an opportunity for processor to do any cleanup required.

    Returns Promise<void>