← All platforms

Symfony error tracking

Symfony has a bundle for that. Use the Sentry bundle to send your exceptions to Telebugs, and keep the reports on your server.

~/hoofnotes  composer require sentry/sentry-symfony
~/hoofnotes  nvim .env.local
# Copy the complete Telebugs DSN, key and path included.
SENTRY_DSN=YOUR_TELEBUGS_DSN
~/hoofnotes  APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear
~/hoofnotes  APP_ENV=prod APP_DEBUG=0 symfony server:start --no-tls

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep sentry/sentry-symfony. Point it at your Telebugs DSN and keep reporting errors as before. The reports go to your server; you don’t need a Sentry account.

Will it catch controller exceptions?

Yes. The bundle connects Symfony’s exception handling to the SDK. Telebugs receives the exception, its PHP backtrace, and the context the SDK includes.

What about an exception my app handles?

You can report that explicitly with \Sentry\captureException. The underlying SDK also works in PHP apps without Symfony.