From 85b90ef42d0a4a9f085066d69a5e978c789427cf Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Fri, 10 Jul 2026 18:50:21 +0800 Subject: [PATCH 1/3] fix(sentry): report skipped result when channel push fails CoHttpTransport::send() always returned success(), even when the channel push failed (channel full, timed out, or closed) or the channel was null (after worker exit). This caused Sentry to treat dropped events as delivered. Map the push return value to the correct ResultStatus: success when the event was accepted by the channel, skipped otherwise, so the SDK's retry/backpressure handling stays accurate. --- src/sentry/src/Transport/CoHttpTransport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sentry/src/Transport/CoHttpTransport.php b/src/sentry/src/Transport/CoHttpTransport.php index 3e1a39812..ffa5e658e 100644 --- a/src/sentry/src/Transport/CoHttpTransport.php +++ b/src/sentry/src/Transport/CoHttpTransport.php @@ -70,9 +70,9 @@ public function send(Event $event): Result $chan = $this->chan; // push event to channel, if timeout is set, it will wait for the specified time - $chan?->push($event, $this->timeout); + $result = $chan?->push($event, $this->timeout) ? ResultStatus::success() : ResultStatus::skipped(); - return new Result(ResultStatus::success(), $event); + return new Result($result, $event); } public function close(?int $timeout = null): Result From 88c9ef59fb89eb852932e8fc9401b61def36d905 Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Sat, 11 Jul 2026 15:14:17 +0800 Subject: [PATCH 2/3] fix(sentry): report failed result when channel push fails --- src/sentry/src/Transport/CoHttpTransport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentry/src/Transport/CoHttpTransport.php b/src/sentry/src/Transport/CoHttpTransport.php index ffa5e658e..63822942b 100644 --- a/src/sentry/src/Transport/CoHttpTransport.php +++ b/src/sentry/src/Transport/CoHttpTransport.php @@ -70,7 +70,7 @@ public function send(Event $event): Result $chan = $this->chan; // push event to channel, if timeout is set, it will wait for the specified time - $result = $chan?->push($event, $this->timeout) ? ResultStatus::success() : ResultStatus::skipped(); + $result = $chan?->push($event, $this->timeout) ? ResultStatus::success() : ResultStatus::failed(); return new Result($result, $event); } From 6af9061344a624af34eb965c32167803dba6c4dc Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Sat, 11 Jul 2026 15:20:42 +0800 Subject: [PATCH 3/3] Revert "fix(sentry): report failed result when channel push fails" This reverts commit 88c9ef59fb89eb852932e8fc9401b61def36d905. --- src/sentry/src/Transport/CoHttpTransport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentry/src/Transport/CoHttpTransport.php b/src/sentry/src/Transport/CoHttpTransport.php index 63822942b..ffa5e658e 100644 --- a/src/sentry/src/Transport/CoHttpTransport.php +++ b/src/sentry/src/Transport/CoHttpTransport.php @@ -70,7 +70,7 @@ public function send(Event $event): Result $chan = $this->chan; // push event to channel, if timeout is set, it will wait for the specified time - $result = $chan?->push($event, $this->timeout) ? ResultStatus::success() : ResultStatus::failed(); + $result = $chan?->push($event, $this->timeout) ? ResultStatus::success() : ResultStatus::skipped(); return new Result($result, $event); }