diff --git a/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php b/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php index f9c3c22fc..df5d22ba9 100644 --- a/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php +++ b/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php @@ -152,8 +152,7 @@ public function prepend(ContainerBuilder $container): void } if (isset($bundles['SentryBundle'])) { - $container->prependExtensionConfig('sentry', [ - 'dsn' => $env === 'prod' ? '%env(SENTRY_DSN)%' : null, + $sentryConfig = [ 'tracing' => [ 'dbal' => [ 'enabled' => false, @@ -183,7 +182,12 @@ public function prepend(ContainerBuilder $container): void NotAcceptableHttpException::class, ], ], - ]); + ]; + + if ($env !== 'prod') { + $sentryConfig['dsn'] = null; + } + $container->prependExtensionConfig('sentry', $sentryConfig); if (isset($bundles['MonologBundle'])) { $container->prependExtensionConfig('sentry', [