← Back to Blog Home

Logging Symfony Errors with Sentry

Logging Symfony Errors with Sentry

Following up on our native Laravel error tracking integration, we’re happy to announce native integration with Symfony via the sentry-symfony package.

Getting Started

Getting started with Symfony error tracking on Sentry is now easier than ever.

Install the sentry/sentry-symfony package:

$ composer require sentry/sentry-symfony

Enable the bundle in app/AppKernel.php:

<?php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Sentry/SentryBundle/SentryBundle(),
        );

        // ...
    }

    // ...
}

And lastly, add your DSN to app/config/config.yml:

sentry:
    dsn: "https://public:secret@sentry.example.com/1"

Learn More

Take a look at the sentry-symfony project on GitHub to learn more about how things are implemented, as well as additional details on using it with Sentry.

Syntax.fm logo

Listen to the Syntax Podcast

Of course we sponsor a developer podcast. Check it out on your favorite listening platform.

Listen To Syntax