diff --git a/app/AppKernel.php b/app/AppKernel.php index a1202773..eed54f01 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -18,6 +18,7 @@ public function registerBundles() new MarcW\RssWriter\Bundle\MarcWRssWriterBundle(), new KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle(), new Swarrot\SwarrotBundle\SwarrotBundle(), + new Sentry\SentryBundle\SentryBundle(), new AppBundle\AppBundle(), ]; diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index 770bfe98..70286970 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml @@ -12,10 +12,20 @@ monolog: main: type: fingers_crossed action_level: error - handler: nested - nested: + handler: grouped_main + grouped_main: + type: group + members: [streamed_main, sentry] + streamed_main: type: stream path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug + sentry: + type: raven + dsn: "%sentry_dsn%" + level: error console: type: console + +sentry: + dsn: "%sentry_dsn%" diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 63f3b26e..5d2f100e 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -23,3 +23,5 @@ parameters: rabbitmq_port: 5672 rabbitmq_login: 'guest' rabbitmq_password: 'guest' + + sentry_dsn: https://xxx:xxx@sentry.io/666 diff --git a/composer.json b/composer.json index e6c6cdd1..ac8dbffe 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,8 @@ "swarrot/swarrot-bundle": "^1.4", "php-amqplib/php-amqplib": "^2.6", "twig/extensions": "^1.4", - "doctrine/doctrine-migrations-bundle": "^1.2" + "doctrine/doctrine-migrations-bundle": "^1.2", + "sentry/sentry-symfony": "^0.7.1" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.0", diff --git a/composer.lock b/composer.lock index a5cac130..1b099dfd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "e2309b48b6362f2143a1e026982124a2", + "content-hash": "94d5013263c4053092bd70e18ececb6f", "packages": [ { "name": "cache/adapter-common", @@ -2936,6 +2936,121 @@ "description": "A security checker for your composer.lock", "time": "2017-02-18T17:53:25+00:00" }, + { + "name": "sentry/sentry", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/getsentry/sentry-php.git", + "reference": "5bee26136ab3fc166334cd972892bf71bd361558" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/5bee26136ab3fc166334cd972892bf71bd361558", + "reference": "5bee26136ab3fc166334cd972892bf71bd361558", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.2.4" + }, + "conflict": { + "raven/raven": "*" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^1.8.0", + "monolog/monolog": "*", + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "suggest": { + "monolog/monolog": "Automatically capture Monolog events as breadcrumbs" + }, + "bin": [ + "bin/sentry" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Raven_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "David Cramer", + "email": "dcramer@gmail.com" + } + ], + "description": "A PHP client for Sentry (http://getsentry.com)", + "homepage": "http://getsentry.com", + "keywords": [ + "log", + "logging" + ], + "time": "2017-02-03T07:32:53+00:00" + }, + { + "name": "sentry/sentry-symfony", + "version": "0.7.1", + "source": { + "type": "git", + "url": "https://github.com/getsentry/sentry-symfony.git", + "reference": "24a8114192ca883944d07deed74e903b5dc2345d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getsentry/sentry-symfony/zipball/24a8114192ca883944d07deed74e903b5dc2345d", + "reference": "24a8114192ca883944d07deed74e903b5dc2345d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sentry/sentry": ">=1.5.0", + "symfony/symfony": ">=2.4.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^1.8.0", + "phpunit/phpunit": "^4.6.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.7.x-dev" + } + }, + "autoload": { + "psr-0": { + "Sentry\\SentryBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "David Cramer", + "email": "dcramer@gmail.com" + } + ], + "description": "Symfony integration for Sentry (http://getsentry.com)", + "homepage": "http://getsentry.com", + "keywords": [ + "errors", + "logging", + "sentry", + "symfony" + ], + "time": "2017-01-26T19:23:44+00:00" + }, { "name": "swarrot/swarrot", "version": "v2.3.0",