phil / error-tracking-bundle
Catch your Symfony errors at home: requests, workers, commands and browsers grouped, kept with a retention purge, shown by role, with chat alerts on new issues.
Package info
github.com/parler-haut-interagir-librement/error-tracking-bundle
Type:symfony-bundle
pkg:composer/phil/error-tracking-bundle
Requires
- php: >=8.5
- ext-mbstring: *
- doctrine/dbal: ^4.5
- phil/error-tracking: ^0.1.1@dev
- phil/ip-anonymizer: ^0.1@dev
- phil/rate-limit: ^0.1.1@dev
- phil/url: ^0.1.4@dev
- psr/clock: ^1.0
- psr/log: ^3.0
- symfony/config: ^8.2
- symfony/dependency-injection: ^8.2
- symfony/http-foundation: ^8.2
- symfony/http-kernel: ^8.2
- symfony/notifier: ^8.2
- symfony/service-contracts: ^3.6
Requires (Dev)
- doctrine/doctrine-bundle: ^3.3
- doctrine/orm: ^3.7
- easycorp/easyadmin-bundle: ^5.8
- monolog/monolog: ^3.0
- phil/monitoring-bundle: ^0.1.1@dev
- phil/notifications-bundle: ^0.1@dev || ^0.2@dev
- phil/privacy-bundle: ^0.1.1@dev
- phil/rate-limit-bundle: ^0.1.1@dev
- phpunit/phpunit: ^13.4
- psr/event-dispatcher: ^1.0
- symfony/asset-mapper: ^8.2
- symfony/browser-kit: ^8.2
- symfony/cache: ^8.2
- symfony/clock: ^8.2
- symfony/console: ^8.2
- symfony/css-selector: ^8.2
- symfony/dom-crawler: ^8.2
- symfony/event-dispatcher: ^8.2
- symfony/event-dispatcher-contracts: ^3.6
- symfony/framework-bundle: ^8.2
- symfony/messenger: ^8.2
- symfony/process: ^8.2
- symfony/rate-limiter: ^8.2
- symfony/routing: ^8.2
- symfony/security-bundle: ^8.2
- symfony/security-core: ^8.2
- symfony/security-csrf: ^8.2
- symfony/twig-bridge: ^8.2
- symfony/twig-bundle: ^8.2
- symfony/ux-twig-component: ^3.7
- symfony/yaml: ^8.2
- twig/extra-bundle: ^3.24
- twig/twig: ^3.21
Suggests
- doctrine/orm: For the tables added to the schema the ORM generates
- easycorp/easyadmin-bundle: To graft the administration pages on the dashboards of an EasyAdmin back office
- monolog/monolog: For the handler that captures the error records
- phil/monitoring-bundle: For the health check of the store of the errors
- phil/notifications-bundle: To send the alerts to recipients or an audience as notifications
- phil/rate-limit-bundle: To count the browsers' reports with a named limiter, beside the others of the application
- symfony/asset-mapper: For the Stimulus controller without a build step
- symfony/console: For the capture of the commands' errors and phil:error-tracking:purge
- symfony/messenger: For the capture of the failed messages and the queued alerts
- symfony/rate-limiter: For the throttles of the groups and of the browsers' reports, which the bundle refuses to build without unless they are disabled
- symfony/routing: For the administration pages and the endpoint of the browsers
- symfony/security-core: For the role of the administration pages
- symfony/security-csrf: For the actions of the administration pages
- twig/twig: For the administration pages
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-21 03:03:55 UTC
README
The errors of a Symfony application, captured wherever they happen and kept in its own database.
phil/error-tracking-bundle brings phil/error-tracking into a Symfony application. The exception a request ends in,
a message a worker failed to handle, the error a console command ends in and the records of a Monolog handler are all
captured through one guard that never throws, never captures while another capture runs — a failing database cannot
start a loop — and takes the same throwable once. Each event is scrubbed of personal data and secrets, grouped by its
fingerprint and kept through DBAL, with a cap of events per group and a purge by retention.
Administration pages, enabled explicitly and open to the users granted their role, list the groups by status and show
each one with its latest events and their traces, with the forms that resolve, ignore or reopen it; with EasyAdmin,
the same pages are grafted on the dashboards of the back office. An alert tells of
the first event of a group and of a regression: a notification to named recipients with phil/notifications-bundle, or
a chat message through the chatter of symfony/notifier, queued through Messenger by default. With
phil/monitoring-bundle, a health check says whether the store answers and whether new groups are flooding in. An
optional endpoint receives the uncaught errors of the browsers from a small Stimulus controller, checked by origin and
token, bounded in size and throttled per client.
It is for any Symfony application that wants its errors at home rather than at a third party: a site in its first phase, a shop, a tool with its health, errors and backups on one page. It is built on the components Symfony already ships: HttpKernel, Messenger, Console and Monolog for the capture, DBAL for the store, Twig, Security and CSRF for the pages, Notifier for the alerts, RateLimiter for the throttles.
Status
| Part | State |
|---|---|
| Capture of requests, failed messages, commands and Monolog records, without loops | Implemented and tested |
| Groups and capped events through DBAL, instants in UTC, the schema listener, the purge command | Implemented and tested |
| Administration pages by role: list, detail with traces, resolve, ignore, reopen | Implemented and tested |
The same pages in an EasyAdmin back office, through #[AdminRoute], and their menu link |
Implemented and tested |
| Alerts for first events and regressions, by notification or chat, queued or sent at once | Implemented and tested |
The degraded state of alerts without a destination: the log, the administration pages and phil:error-tracking:status |
Implemented and tested |
| The health check of the store for phil/monitoring-bundle | Implemented and tested |
| The browsers' reports counted by a named limiter of phil/rate-limit-bundle | Implemented and tested |
| The endpoint of the browsers' errors and its Stimulus controller | Implemented and tested, the parser fuzzed, the controller's tests run with the suites |
| Source maps of minified scripts | Not started, planned after the first release: a browser's frame keeps the minified script's address and line |
| Reception of the Sentry envelope format | Not provided, by choice: the capture points are the interface, see The Sentry envelope |
| A guide from sentry-symfony | Written: Migrating from sentry-symfony |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, installing, the tables, the routes, the Monolog handler. |
| Configuration | Every key of phil_error_tracking. |
| Capture | Each capture point, what it tags, arguments in messages, and the guard against loops. |
| Storage | The tables, the cap of events, the purge. |
| Administration | The pages, the role, the layout, the actions, an EasyAdmin back office. |
| Alerts | The notifications and the chat messages, queued or sent at once, and the degraded state. |
| Browser errors | The endpoint, its checks, and the Stimulus controller. |
| The Sentry envelope | Why the endpoint does not read the Sentry format. |
| Migrating from sentry-symfony | Moving an application from the Sentry SDK to the capture points, step by step. |
| Extension points | The store, the alerter and the ignored exceptions. |
| Testing | The bundle's tests, the fuzz target, and how to test an application that captures errors. |
| Reference | Every class, service, route, command and template of the bundle. |
Quick start
composer require phil/error-tracking-bundle
# config/packages/phil_error_tracking.yaml phil_error_tracking: release: '%env(default::APP_RELEASE)%' alerts: transport: discord admin: true
# config/routes/phil_error_tracking.yaml phil_error_tracking: resource: '@PhilErrorTrackingBundle/config/routes.php' prefix: /admin/errors
bin/console doctrine:migrations:diff # the two tables of the bundle
bin/console doctrine:migrations:migrate
The exceptions of the requests, the failed messages and the errors of the commands are captured from then on; the
groups are listed at /admin/errors for ROLE_ADMIN.
Requirements
PHP 8.5 or later, phil/error-tracking, phil/ip-anonymizer, phil/url, phil/rate-limit, Doctrine DBAL 4 and
Symfony 8.2; see Installation for the optional packages.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.