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.
Architecture Fit
ExportTraceServiceRequest, ResourceMetrics, etc.). In any sane Laravel architecture it is pulled in transitively by open-telemetry/exporter-otlp; no application code imports it directly.Laravel app → OpenTelemetry PHP SDK (API/SDK) → OTLP exporter → gen-otlp-protobuf → OTLP collector → backend (Tempo/Jaeger/Prometheus/vendor).exporter-otlp, sdk, contrib). A TPM who scopes this package as "the observability solution" will under-resource the actual work by roughly an order of magnitude.Integration Feasibility
google/protobuf (native, pure PHP, dependency-free) versus the pecl protobuf C extension. The README explicitly recommends the extension for production. That translates into a Docker base-image decision, a CI/PECL build step, and a platform-team commitment — not a composer require.grpc/grpc extension) and is a separate infrastructure conversation (proxy/firewall/HTTP2). HTTP/protobuf is the lower-friction default for most Laravel estates.Technical Risk
proto/otel), and versions track OTel spec releases. Any governance scorecard that gates on these two fields will produce a false negative — call this out before it enters a dependency-review board.ext-protobuf silently fall back to the pure-PHP implementation — functional, but a material CPU/latency cost at volume. This fails quietly, which is the worst kind of production risk.Key Questions
ext-protobuf? If not, what is the acceptance rationale?Stack Fit
open-telemetry/exporter-otlp plus open-telemetry/sdk; gen-otlp-protobuf follows as a transitive pin. This is the single most important instruction to give the engineering team, and it is the one most likely to be violated by an enthusiastic first implementer.config/observability.php + .env (OTEL_* variables), with the exporter endpoint/headers managed as secrets. Do not scatter OTEL_ reads through the codebase.pecl install protobuf (and enable it) to the runtime image; add a CI assertion that the extension is loaded in the built image. This is a platform-team deliverable, not an app-team one.composer.json; exclude the OTel group from blanket Renovate/Dependabot automerge and route those PRs to the owning team.Migration Path
gen-otlp-protobuf resolves as a transitive dependency at the expected version, and confirm ext-protobuf is present in a built image. Exit criterion: composer show output matches the ADR.Compatibility
composer.json, not this one.google/protobuf v4 is supported (see 1.2.1). The PECL extension installs alongside the native library and takes precedence automatically — meaning a single image can serve both paths if needed.Sequencing note: the collector should be stood up before the first instrumented service ships, even in staging. Teams that instrument first and provision the collector later accumulate dead instrumentation and lose trust in the effort.
Maintenance
Support
Scaling
ext-protobuf a production image requirement and enforce it in CI, not a suggestion in a README.Failure Modes
Ramp-up
gen-otlp-protobuf. Their ramp-up is on OpenTelemetry concepts (traces/spans/context propagation/sampling) and Laravel instrumentation points — budget for that, not for protobuf.How can I help you explore Laravel packages today?