Symfony guide

Symfony error monitoring

Errilo receives your Symfony errors from the official sentry/sentry-symfony bundle: exceptions thrown in your controllers, with the request and the failing frame of your code. Already on Sentry? Only the DSN changes.

Updated

Errilo is in private beta. This guide describes the setup our compatibility suite tests today.

What gets caught

Our compatibility suite runs a Symfony 8.1 app in a container, sends it a request that throws, and checks in Errilo the issue’s title, the failing frame (src/Controller/BoomController.php), the request, the release, the environment and the SDK version, for every version listed below. The kernel runs in prod, and also boots in dev and test with this configuration.

The value of APP_SECRET never reaches Errilo in clear: the SDK sends it, Errilo replaces it with [Filtered] on receipt, which our suite checks.

Not covered by our suite: Symfony before 8, Messenger and console commands, and API Platform. Errilo stores no tracing or profiling: leave them off.

Setup

Install the bundle:

composer require sentry/sentry-symfony

Set the DSN of your Errilo project:

.env
SENTRY_DSN=https://<key>@ingest.errilo.com/<project>

Register the bundle yourself. When Composer runs without questions, as in a scripted install, Symfony Flex doesn’t apply the bundle’s recipe, and the recipe only registers it for prod: without the bundle, a sentry: key at the root of the configuration crashes the kernel in dev and test. This line registers it in every environment:

config/bundles.php
// add this line to the returned array
    Sentry\SentryBundle\SentryBundle::class => ['all' => true],
config/packages/sentry.yaml
sentry:
    dsn: '%env(SENTRY_DSN)%'

If you already have a Sentry setup, keep it and change the DSN.

Stack traces from your code

PHP needs no source maps: a frame carries your file and line as they are on the server. Errilo turns the usual deployment folders (/var/www/html/, /var/www/, and the releases/<n>/ and current/ folders of Deployer and Capistrano) into paths relative to your repository, and files under vendor/ count as dependencies, not your code. The same error under releases/41/, releases/42/ or current/ stays a single issue across deployments.

Our compatibility suite checks the paths of a PHP app in /var/www/html. The tests of the Errilo app cover the Deployer and Capistrano folders and the grouping across deployments; the suite doesn’t deploy with those tools.

Tested versions

Versions of sentry/sentry-symfony tested against Errilo
Tested releaseTested version
Oldestsentry/sentry-symfony:5.7.0
In betweensentry/sentry-symfony:5.12.0
Latestsentry/sentry-symfony:5.17.0

Use sentry/sentry-symfony 5.7.0 or later: it is the oldest 5.x that accepts Symfony 8, the version our suite runs (skeleton 8.1, symfony/framework-bundle 8.1.11).

Use sentry/sentry 4.17.1 or later, which Composer picks for the package above: earlier versions send a “Deprecated” event with every event under PHP 8.5 and later. Our suite runs PHP 8.6, and nothing else.

Early access

The private beta is open, by invitation, to a handful of teams running a JavaScript, TypeScript, PHP or Python app in production. Join the waitlist and we’ll write to invite you.