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\OtlpCode
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);
}