Skip to content

swquinn/sentry-symfony

 
 

Repository files navigation

sentry-symfony

Symfony integration for Sentry.

Stable release Unstable release

Build status Scrutinizer Coverage 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:[email protected]/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 value of your project. Leaving this value empty will effectively disable Sentry reporting.

sentry:
    dsn: "https://public:[email protected]/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

About

Symfony integration for Sentry

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.0%
  • Makefile 1.0%