From c035ff674017728384b912673f35dc6b79cacabb Mon Sep 17 00:00:00 2001 From: Arthur de Moulins Date: Tue, 12 Dec 2023 17:16:47 +0100 Subject: [PATCH] WIP --- .../DependencyInjection/AlchemyCoreExtension.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php b/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php index 1d112332e..b95ef4695 100644 --- a/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php +++ b/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php @@ -13,7 +13,9 @@ use Symfony\Component\DependencyInjection\Loader; use Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler; use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException; +use Symfony\Component\Serializer\Exception\UnsupportedFormatException; use Symfony\Component\Yaml\Yaml; /** @@ -114,7 +116,6 @@ public function prepend(ContainerBuilder $container): void } if (isset($bundles['SentryBundle'])) { $container->prependExtensionConfig('sentry', [ - 'register_error_listener' => false, // Disables the ErrorListener to avoid duplicated log in sentry 'tracing' => [ 'dbal' => [ 'enabled' => false, @@ -130,11 +131,18 @@ public function prepend(ContainerBuilder $container): void ], 'ignore_exceptions' => [ TooManyRequestsHttpException::class, + NotFoundHttpException::class, + UnsupportedFormatException::class, ], ] ]); if (isset($bundles['MonologBundle'])) { + $container->prependExtensionConfig('sentry', [ + 'register_error_handler' => false, // Disables the ErrorListener to avoid duplicated log in sentry + 'register_error_listener' => false, // Disables the ErrorListener, ExceptionListener and FatalErrorListener integrations of the base PHP SDK + ]); + $container->prependExtensionConfig('monolog', [ 'handlers' => [ 'sentry' => [