Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Dec 12, 2023
1 parent 4035d31 commit c035ff6
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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,
Expand All @@ -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' => [
Expand Down

0 comments on commit c035ff6

Please sign in to comment.