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

Breadcrumb

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

function MetricExporter::__construct

@psalm-param TransportInterface<SUPPORTED_CONTENT_TYPES> $transport

File

vendor/open-telemetry/exporter-otlp/MetricExporter.php, line 30

Class

MetricExporter
@psalm-import-type SUPPORTED_CONTENT_TYPES from ProtobufSerializer

Namespace

OpenTelemetry\Contrib\Otlp

Code

public function __construct(TransportInterface $transport, string|Temporality|null $temporality = null) {
    if (!class_exists('\\Google\\Protobuf\\Api')) {
        throw new RuntimeException('No protobuf implementation found (ext-protobuf or google/protobuf)');
    }
    $this->serializer = ProtobufSerializer::forTransport($this->transport);
}

API Navigation

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