open-telemetry/gen-otlp-protobuf
Generated OTLP protobuf classes for OpenTelemetry PHP, enabling efficient trace, metric, and log export. Requires google/protobuf, with the optional PHP C extension recommended for production performance.
pecl protobuf C extension makes export significantly faster. That is a concrete input to the capacity/cost line for high-throughput PHP services, not a theoretical one.Consider it when:
open-telemetry/opentelemetry-php and enabling the OTLP exporters (gRPC or HTTP). In that case this arrives transitively — you do not add it deliberately, you just need to know it is there and pin it consistently with the SDK.pecl protobuf extension — the README explicitly calls this the recommended production configuration. If you cannot install PHP extensions in your runtime, budget for the performance penalty of the native library.Look elsewhere when:
Resource/Span/Metric shapes produces malformed telemetry that collectors silently reject — a failure mode that is expensive to debug and looks like "observability is broken."Due-diligence flags to raise before adoption:
open-telemetry/opentelemetry-php, 917 stars) as the source of truth for health, not this package's page.For executives — the one-paragraph version. "This is a small open-source component that lets our PHP services send telemetry to any OpenTelemetry-compatible backend. It does not add a feature; it removes a lock-in. Adopting it means we instrument once, in a standard format, and can then change observability vendors on commercial terms rather than on migration cost. It is low-risk and near-zero-cost to adopt, and it should be scoped as plumbing inside an existing observability initiative — not funded as a standalone project. The one commitment it creates is an ongoing obligation to keep the telemetry schema current, which is a maintenance line item, not a build."
For engineering — the practical framing.
"gen-otlp-protobuf is the generated PHP protobuf layer for OTLP; it is the transport format, not the instrumentation. You will almost never require it directly — pull in open-telemetry/opentelemetry-php, enable the OTLP exporter, and this comes along. Install pecl protobuf in production images; without it, export throughput is noticeably worse. Pair it with a collector (otel-collector locally, Docker or Kubernetes in staging) and wire tracing into Laravel middleware, queue/job.processing events, and the HTTP client, then extend to metrics. Use HTTP for simplicity where gRPC infrastructure is inconvenient — gRPC needs grpc/grpc and proxy-friendliness is a real constraint. Two things to own deliberately: pin the package version in lockstep with the SDK, and add a CI check that validates payload shape so a spec bump doesn't silently drop telemetry at the collector."
How can I help you explore Laravel packages today?