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

Breadcrumb

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

function ConsoleMetricExporter::convertMetric

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

File

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

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 convertMetric(Metric $metric) : array {
    return [
        'name' => $metric->name,
        'description' => $metric->description,
        'unit' => $metric->unit,
        'data' => $metric->data,
    ];
}

API Navigation

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