open-telemetry/exporter-otlp
OpenTelemetry OTLP exporter for PHP. Send traces to an OpenTelemetry Collector via HTTP (JSON/protobuf) or gRPC (with transport-grpc). Requires a protobuf runtime; for production, install the protobuf PECL extension for best performance.
Adopt if:
open-telemetry/opentelemetry) and needs a standardized exporter for OTLP.Look elsewhere if:
*"This package lets us standardize how our Laravel apps send performance, logging, and tracing data to our observability tools—without vendor lock-in. By using OpenTelemetry Protocol (OTLP), we can:
- Reduce costs by consolidating telemetry into one pipeline (e.g., OpenTelemetry Collector).
- Future-proof our stack for multi-cloud or hybrid environments.
- Debug faster by correlating traces across services (critical for our [high-traffic feature]).
- Comply effortlessly with audit requirements by exporting structured metadata.
It’s a low-risk choice: maintained by the OpenTelemetry community, used by [competitors/enterprises], and avoids custom engineering. The upfront effort is minimal—just configuring our existing OTel PHP setup to use this exporter."*
*"This is the official OTLP exporter for OpenTelemetry PHP, giving us:
- Protocol compliance: OTLP 1.0+ support for traces, metrics, and logs in one go.
- Performance: gRPC/HTTP batching reduces overhead vs. per-call logging.
- Flexibility: Works with any OTLP-compatible backend (e.g., Jaeger, Prometheus, Datadog).
- Sampling: Built-in support to reduce volume for high-traffic apps.
Implementation:
- Add the package (
composer require open-telemetry/exporter-otlp).- Configure your OTel PHP SDK to use the OTLP exporter (e.g.,
setExporter(new OtlpExporter())).- Point to your collector/backend (e.g.,
http://collector:4318).Trade-offs:
- Requires an OTLP-compatible backend (but we already have [Collector/Datadog]).
- Slight learning curve for OTel concepts (but docs are solid).
Alternatives: Custom exporters or vendor-specific tools, but this is the community standard—less maintenance, more interoperability."*
How can I help you explore Laravel packages today?