Overrides SpanProcessorInterface::onEnd
public function onEnd(ReadableSpanInterface $span) : void { if ($this->closed) { return; } if (!$span->getContext() ->isSampled()) { return; } $spanData = $span->toSpanData(); $this->flush(fn() => $this->exporter ->export([ $spanData, ]) ->await(), 'export', false, $this->exportContext); }