diff --git a/src/sentry/src/Tracing/Listener/TracingAmqpListener.php b/src/sentry/src/Tracing/Listener/TracingAmqpListener.php index 8779848b7..4e2899dbf 100644 --- a/src/sentry/src/Tracing/Listener/TracingAmqpListener.php +++ b/src/sentry/src/Tracing/Listener/TracingAmqpListener.php @@ -105,7 +105,7 @@ protected function finishTransaction(AfterConsume|FailToConsume $event): void 'messaging.amqp.message.exchange' => $message->getExchange(), 'messaging.amqp.message.queue' => $message->getQueue(), 'messaging.amqp.message.pool_name' => $message->getPoolName(), - 'messaging.amqp.message.result' => $event->getResult(), + 'messaging.amqp.message.result' => $event instanceof AfterConsume ? $event->getResult()->value : 'fail', ]; $tags = [];