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

Breadcrumb

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

function LogsConverter::setAttributes

Parameters

Resource_|LogRecord|InstrumentationScope $pElement:

3 calls to LogsConverter::setAttributes()
LogsConverter::convertInstrumentationScope in vendor/open-telemetry/exporter-otlp/LogsConverter.php
LogsConverter::convertLogRecord in vendor/open-telemetry/exporter-otlp/LogsConverter.php
LogsConverter::convertResourceLogs in vendor/open-telemetry/exporter-otlp/LogsConverter.php

File

vendor/open-telemetry/exporter-otlp/LogsConverter.php, line 132

Class

LogsConverter

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