open-telemetry/sdk
OpenTelemetry PHP SDK for generating traces, metrics, and logs. Implements the API and works with exporters to emit telemetry. Supports manual setup, an SDK builder, and optional auto-registration via environment variables during Composer autoload.
Log::channel()) with structured telemetry.Adopt if:
Look elsewhere if:
"OpenTelemetry is the industry-standard for observability, and this PHP SDK lets us instrument our Laravel apps with traces, metrics, and logs—without vendor lock-in. Think of it as ‘Google Analytics for backend systems’: we’ll track performance bottlenecks, debug distributed transactions, and reduce MTTR (mean time to resolve issues). Early adopters like Shopify and Comcast use it to cut costs and improve reliability. This is a strategic investment in scalability and operational excellence."
Key Outcomes: ✅ Proactive issue detection (e.g., slow API calls before users complain). ✅ Cost savings (avoid per-request APM tooling; self-host exporters if needed). ✅ Future-proofing (works with any backend tool; e.g., switch from Datadog to Prometheus later).
*"This SDK gives us OpenTelemetry’s full power in PHP:
orders_processed, payment_failures).Implementation Plan:
Why Not [Alternative X]?
Next Steps:
OTEL_PHP_AUTOLOAD_ENABLED=true.Risk Mitigation:
How can I help you explore Laravel packages today?