Symfony integration for Sentry.
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require sentry/sentry-symfony
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Sentry\SentryBundle\SentryBundle(),
);
// ...
}
// ...
}
Add your DSN to app/config/config.yml
:
sentry:
dsn: "https://public:[email protected]/1"
The following can be configured via app/config/config.yml
:
The base path to your application. Used to trim prefixes and mark frames as part of your application.
sentry:
app_path: "/path/to/myapp"
sentry:
dsn: "https://public:[email protected]/1"
The environment your code is running in (e.g. production).
sentry:
environment: "%kernel.environment%"
The version of your application. Often this is the git sha.
sentry:
release: "beeee2a06521a60e646bbb8fe38702e61e4929bf"
A list of prefixes to strip from filenames. Often these would be vendor/include paths.
sentry:
prefixes:
- /usr/lib/include
sentry:
skip_capture:
- "Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface"
Define which error types should be reported.
sentry:
error_types: E_ALL & ~E_DEPRECATED & ~E_NOTICE