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

Breadcrumb

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

function SpanConverter::setAttributes

Parameters

Resource_|Span|Event|Link|InstrumentationScope $pElement:

3 calls to SpanConverter::setAttributes()
SpanConverter::convertResourceSpans in vendor/open-telemetry/exporter-otlp/SpanConverter.php
SpanConverter::convertScopeSpans in vendor/open-telemetry/exporter-otlp/SpanConverter.php
SpanConverter::convertSpan in vendor/open-telemetry/exporter-otlp/SpanConverter.php

File

vendor/open-telemetry/exporter-otlp/SpanConverter.php, line 113

Class

SpanConverter

Namespace

OpenTelemetry\Contrib\Otlp

Code

private function setAttributes($pElement, AttributesInterface $attributes) : void {
    foreach ($attributes as $key => $value) {
        
        /** @psalm-suppress InvalidArgument */
        $pElement->getAttributes()[] = (new KeyValue())->setKey($key)
            ->setValue(AttributesConverter::convertAnyValue($value));
    }
    $pElement->setDroppedAttributesCount($attributes->getDroppedAttributesCount());
}

API Navigation

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