addSpanProcessor

fun addSpanProcessor(processor: (SpanExporter) -> SpanProcessor)(source)

Adds a SpanProcessor creator function to the OpenTelemetry configuration.

Parameters

processor

A function that takes a SpanExporter and returns the SpanProcessor. This allows defining custom logic for processing spans before they are exported.