diff --git a/src/sentry/src/Listener/SetupSentryListener.php b/src/sentry/src/Listener/SetupSentryListener.php index 9fd11f9d4..a9ee14ffc 100644 --- a/src/sentry/src/Listener/SetupSentryListener.php +++ b/src/sentry/src/Listener/SetupSentryListener.php @@ -78,12 +78,29 @@ public function listen(): array public function process(object $event): void { + $this->compatibilityConfigurations(); $this->setupRequestLifecycle(); $this->setupRedisEventEnable(); $this->setupIgnoreExceptions(); $this->registerLoggerChannel(); } + protected function compatibilityConfigurations(): void + { + $mapping = [ + 'sentry.tracing.spans' => 'sentry.tracing_spans', + 'sentry.tracing.extra_tags' => 'sentry.tracing_tags', + 'sentry.tracing.enable' => 'sentry.tracing', // MUST be last + ]; + + foreach ($mapping as $oldKey => $newKey) { + if ($this->config->has($oldKey) && ! $this->config->has($newKey)) { + $this->config->set($newKey, $this->config->get($oldKey)); + $this->config->set($oldKey, []); + } + } + } + protected function setupIgnoreExceptions(): void { $configKey = 'sentry.ignore_exceptions';