Forces to export all finished spans
Called when a ReadableSpan is ended, if the span.isRecording()
returns true.
the Span that just ended.
ProtectedonCalled when a Span is started, if the span.isRecording()
returns true.
Shuts down the processor. Called when SDK is shut down. This is an opportunity for processor to do any cleanup required.
The
@opentelemetry/sdk-traceBatchSpanProcessor, which throws a descriptiveTypeErrorwhen it is not given an{ exporter }options object, such as the OpenTelemetry JS 2.x formnew BatchSpanProcessor(exporter). It also warns once per variable when anOTEL_BSP_*variable is set and the matching option is left out, since OpenTelemetry JS 3 no longer reads them.Passing
spanProcessorstoregister()replaces the default Phoenix exporter, so give the exporter its Phoenix URL and auth yourself.Example