duxet/sentry-symfony

This package is abandoned and no longer maintained. The author suggests using the sentry/sentry-symfony package instead.

Symfony integration for Sentry (http://getsentry.com)

0.8.0 2017-04-27 11:36 UTC

README

Symfony integration for Sentry.

Build Status

Installation

Step 1: Download the Bundle

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.

Step 2: Enable the Bundle

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(),
        );

        // ...
    }

    // ...
}

Step 3: Configure the SDK

Add your DSN to app/config/config.yml:

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

Configuration

The following can be configured via app/config/config.yml:

app_path

The base path to your application. Used to trim prefixes and mark frames as part of your application.

sentry:
    app_path: "/path/to/myapp"

dsn

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

environment

The environment your code is running in (e.g. production).

sentry:
    environment: "%kernel.environment%"

release

The version of your application. Often this is the git sha.

sentry:
    release: "beeee2a06521a60e646bbb8fe38702e61e4929bf"

prefixes

A list of prefixes to strip from filenames. Often these would be vendor/include paths.

sentry:
    prefixes:
        - /usr/lib/include

skip some exceptions

sentry:
    skip_capture:
        - "Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface"

error types

Define which error types should be reported.

sentry:
    error_types: E_ALL & ~E_DEPRECATED & ~E_NOTICE