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

Breadcrumb

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

function SpanBuilder::addLink

@inheritDoc

File

vendor/open-telemetry/sdk/Trace/SpanBuilder.php, line 48

Class

SpanBuilder

Namespace

OpenTelemetry\SDK\Trace

Code

public function addLink(API\SpanContextInterface $context, iterable $attributes = []) : API\SpanBuilderInterface {
    if (!$context->isValid()) {
        return $this;
    }
    $this->totalNumberOfLinksAdded++;
    if (count($this->links) === $this->tracerSharedState
        ->getSpanLimits()
        ->getLinkCountLimit()) {
        return $this;
    }
    $this->links[] = new Link($context, $this->tracerSharedState
        ->getSpanLimits()
        ->getLinkAttributesFactory()
        ->builder($attributes)
        ->build());
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal