From 52e401180bd206c85a8b189210222ff900f28df0 Mon Sep 17 00:00:00 2001 From: cloudop Date: Thu, 29 Sep 2022 22:16:59 +0800 Subject: [PATCH] fix: Fix not listening to queue events because `QueueManager` is registered as `queue` in the container and not by it's class name (#568) Co-authored-by: Alex Bouma --- CHANGELOG.md | 1 + src/Sentry/Laravel/Tracing/ServiceProvider.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 381e1ac9..8cb14e79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Fix not listening to queue events because `QueueManager` is registered as `queue` in the container and not by it's class name (#568) - Fix status code not populated on transaction if response did not inherit from `Illuminate\Http\Response` like `Illuminate\Http\JsonResponse` (#573) ## 2.13.0 diff --git a/src/Sentry/Laravel/Tracing/ServiceProvider.php b/src/Sentry/Laravel/Tracing/ServiceProvider.php index 5bff7a9c..3235b3c4 100644 --- a/src/Sentry/Laravel/Tracing/ServiceProvider.php +++ b/src/Sentry/Laravel/Tracing/ServiceProvider.php @@ -72,9 +72,9 @@ private function bindEvents(array $tracingConfig): void $handler->subscribe(); - if ($this->app->bound(QueueManager::class)) { + if ($this->app->bound('queue')) { $handler->subscribeQueueEvents( - $this->app->make(QueueManager::class) + $this->app->make('queue') ); } }