zaeem2396 / obeserva
Framework-aware observability for PHP (Datadog APM and optional OpenTelemetry)
Requires
- php: ^8.2
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- symfony/config: ^6.4|^7.0
- symfony/dependency-injection: ^6.4|^7.0
- symfony/event-dispatcher: ^6.4|^7.0
- symfony/http-kernel: ^6.4|^7.0
- symfony/messenger: ^6.4|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- illuminate/http: ^10.0|^11.0|^12.0|^13.0
- illuminate/queue: ^10.0|^11.0|^12.0|^13.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.0
Suggests
- datadog/php-tracer: For Datadog APM spans (or use the ddtrace extension)
README
Observa adds structured spans for Laravel and Symfony using the Datadog PHP tracer by default, or OpenTelemetry when you install open-telemetry/sdk and set OBSERVA_TRACER=opentelemetry (see docs/USAGE.md). Instrumentation covers HTTP traffic (Laravel web and api middleware groups), controllers, queue jobs / Messenger, events, listeners, middleware, and policy checks. Exceptions are tagged on the active span (error.type, error.message). Without a configured backend, instrumentation is a no-op and your app behaves normally.
Requirements: PHP 8.2+; Laravel 10–13 (Laravel 13 needs PHP 8.3+) or Symfony 6.4 / 7; Datadog (tracer + Agent) and/or OpenTelemetry (SDK + TracerProvider / OTLP) depending on observa.tracer.
Install
Laravel
composer require zaeem2396/obeserva php artisan observa:install
Symfony
composer require zaeem2396/obeserva
Register Observa\Symfony\ObservaBundle in config/bundles.php and set observa.enabled and other options in your bundle config.
Documentation
| Topic | Location |
|---|---|
| Configuration, Docker, production, optional features | docs/USAGE.md |
| Changelog | CHANGELOG.md |
| Contributing & CI | docs/CONTRIBUTING.md |
| Packagist & releases | Packagist · docs/PACKAGIST.md |
License
Apache-2.0.