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
Namespace
OpenTelemetry\Contrib\OtlpCode
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;
}