From 7d2620320ed813f4afcab9898f76e8409fdbb021 Mon Sep 17 00:00:00 2001 From: Robin Lehrmann Date: Fri, 8 Jul 2022 13:46:25 +0200 Subject: [PATCH] made sentry config for prod only (#1417) added monolog example config to omit confusion --- .../3.0/config/packages/prod/sentry.yaml | 22 +++++++++++++++++++ .../3.0/config/packages/sentry.yaml | 2 -- sentry/sentry-symfony/3.0/manifest.json | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml delete mode 100644 sentry/sentry-symfony/3.0/config/packages/sentry.yaml diff --git a/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml b/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml new file mode 100644 index 00000000..bc16c7f4 --- /dev/null +++ b/sentry/sentry-symfony/3.0/config/packages/prod/sentry.yaml @@ -0,0 +1,22 @@ +sentry: + dsn: '%env(SENTRY_DSN)%' + options: + excluded_exceptions: + - Symfony\Component\HttpKernel\Exception\NotFoundHttpException + - Symfony\Component\Security\Core\Exception\AccessDeniedException + + # If you are using Monolog, you also need these additional configuration and services to log the errors correctly: + # https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration + # register_error_listener: false + + # monolog: + # handlers: + # sentry: + # type: service + # id: Sentry\Monolog\Handler + + # services: + # Sentry\Monolog\Handler: + # arguments: + # $hub: '@Sentry\State\HubInterface' + # $level: !php/const Monolog\Logger::ERROR diff --git a/sentry/sentry-symfony/3.0/config/packages/sentry.yaml b/sentry/sentry-symfony/3.0/config/packages/sentry.yaml deleted file mode 100644 index 342036fe..00000000 --- a/sentry/sentry-symfony/3.0/config/packages/sentry.yaml +++ /dev/null @@ -1,2 +0,0 @@ -sentry: - dsn: '%env(SENTRY_DSN)%' diff --git a/sentry/sentry-symfony/3.0/manifest.json b/sentry/sentry-symfony/3.0/manifest.json index c96ec90e..097e7e84 100644 --- a/sentry/sentry-symfony/3.0/manifest.json +++ b/sentry/sentry-symfony/3.0/manifest.json @@ -1,6 +1,6 @@ { "bundles": { - "Sentry\\SentryBundle\\SentryBundle": ["all"] + "Sentry\\SentryBundle\\SentryBundle": ["prod"] }, "copy-from-recipe": { "config/": "%CONFIG_DIR%/"