open-telemetry/transport-grpc

gRPC transport for OpenTelemetry PHP.

1.1.0 2024-03-14 23:14 UTC

This package is auto-updated.

Last update: 2024-12-02 13:15:48 UTC


README

Releases Source Mirror Latest Version Stable

OpenTelemetry gRPC Transport

gRPC transport for OpenTelemetry.

This package provides a transport which can be used by open-telemetry/exporter-otlp to send protobuf-encoded telemetry over gRPC.

Documentation

https://opentelemetry.io/docs/instrumentation/php/exporters/#otlp

Usage

See https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/traces/exporters/otlp_grpc.php

$transport = (new \OpenTelemetry\Contrib\Grpc\GrpcTransportFactory())->create('http://collector:4317');
$exporter = new \OpenTelemetry\Contrib\Otlp\SpanExporter($transport);

Contributing

This repository is a read-only git subtree split. To contribute, please see the main OpenTelemetry PHP monorepo.