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

Breadcrumb

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

function ConsoleMetricExporter::convertInstrumentationScope

1 call to ConsoleMetricExporter::convertInstrumentationScope()
ConsoleMetricExporter::export in vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php
@inheritDoc

File

vendor/open-telemetry/sdk/Metrics/MetricExporter/ConsoleMetricExporter.php, line 87

Class

ConsoleMetricExporter
Console metrics exporter. Note that the output is human-readable JSON, not compatible with OTLP.

Namespace

OpenTelemetry\SDK\Metrics\MetricExporter

Code

private function convertInstrumentationScope(InstrumentationScopeInterface $scope) : array {
    return [
        'name' => $scope->getName(),
        'version' => $scope->getVersion(),
        'attributes' => $scope->getAttributes()
            ->toArray(),
        'dropped_attributes_count' => $scope->getAttributes()
            ->getDroppedAttributesCount(),
        'schema_url' => $scope->getSchemaUrl(),
    ];
}

API Navigation

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