Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SimpleSpanProcessor.php

function SimpleSpanProcessor::onEnd

Overrides SpanProcessorInterface::onEnd

File

vendor/open-telemetry/sdk/Trace/SpanProcessor/SimpleSpanProcessor.php, line 41

Class

SimpleSpanProcessor

Namespace

OpenTelemetry\SDK\Trace\SpanProcessor

Code

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);
}
RSS feed
Powered by Drupal