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

Breadcrumb

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

function Span::addLink

File

vendor/open-telemetry/sdk/Trace/Span.php, line 148

Class

Span

Namespace

OpenTelemetry\SDK\Trace

Code

public function addLink(SpanContextInterface $context, iterable $attributes = []) : self {
    if ($this->hasEnded) {
        return $this;
    }
    if (!$context->isValid()) {
        return $this;
    }
    if (++$this->totalRecordedLinks > $this->spanLimits
        ->getLinkCountLimit()) {
        return $this;
    }
    $this->links[] = new Link($context, $this->spanLimits
        ->getLinkAttributesFactory()
        ->builder($attributes)
        ->build());
    return $this;
}
RSS feed
Powered by Drupal