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

Breadcrumb

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

function MetricConverter::convertScopeMetrics

1 call to MetricConverter::convertScopeMetrics()
MetricConverter::convert in vendor/open-telemetry/exporter-otlp/MetricConverter.php

File

vendor/open-telemetry/exporter-otlp/MetricConverter.php, line 99

Class

MetricConverter

Namespace

OpenTelemetry\Contrib\Otlp

Code

private function convertScopeMetrics(SDK\Common\Instrumentation\InstrumentationScopeInterface $instrumentationScope) : ScopeMetrics {
    $pScopeMetrics = new ScopeMetrics();
    $pInstrumentationScope = new InstrumentationScope();
    $pInstrumentationScope->setName($instrumentationScope->getName());
    $pInstrumentationScope->setVersion((string) $instrumentationScope->getVersion());
    $this->setAttributes($pInstrumentationScope, $instrumentationScope->getAttributes());
    $pScopeMetrics->setScope($pInstrumentationScope);
    $pScopeMetrics->setSchemaUrl((string) $instrumentationScope->getSchemaUrl());
    return $pScopeMetrics;
}

API Navigation

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