open-telemetry/api
OpenTelemetry PHP API package: vendor-neutral interfaces and context propagation for traces, metrics, and logs. Use it to instrument libraries/apps while staying decoupled from any specific SDK implementation. Documentation at opentelemetry.io.
Adopt if:
Look elsewhere if:
opentelemetry-php/contrib).For Executives: *"This package lets us standardize observability across our PHP services—like adding ‘GPS tracking’ for our application’s performance. It integrates with tools we already use (e.g., Datadog, Prometheus) and future-proofs us against vendor lock-in. For example, we could:
For Engineers: *"The OpenTelemetry PHP API gives us:
use OpenTelemetry\API\Trace\TracerInterface;
$tracer = app(TracerInterface::class);
$span = $tracer->spanBuilder('user.order')->startSpan();
try {
$order = Order::create($request->all());
$span->setAttribute('order.id', $order->id);
} finally {
$span->end();
}
Trade-offs: Minimal overhead (~5% CPU), but requires discipline to instrument key paths. Start with high-value flows (e.g., checkout, API gateways)."*
How can I help you explore Laravel packages today?