From 46d6eb92bfeddbd1e4ce2a755d025d267556a51b Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Fri, 14 Nov 2025 09:45:07 +0800 Subject: [PATCH] feat(sentry): improve coroutine backtrace filtering - Add 'Hyperf\Coroutine\wait' and 'wait' to skip functions list - Add 'FriendsOfHyperf\Sentry\Transport\CoHttpTransport->loop' to break functions list This improves the accuracy of backtrace filtering for Sentry error reporting by including additional coroutine-related functions that should be skipped or treated as break points during stack trace analysis. --- src/sentry/src/Util/CoroutineBacktraceHelper.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sentry/src/Util/CoroutineBacktraceHelper.php b/src/sentry/src/Util/CoroutineBacktraceHelper.php index d517e7dd3..f523fe30a 100644 --- a/src/sentry/src/Util/CoroutineBacktraceHelper.php +++ b/src/sentry/src/Util/CoroutineBacktraceHelper.php @@ -21,12 +21,14 @@ class CoroutineBacktraceHelper 'Hyperf\Coroutine\Waiter->wait', 'Hyperf\Coroutine\co', 'co', 'Hyperf\Coroutine\go', 'go', + 'Hyperf\Coroutine\wait', 'wait', 'Hyperf\Coroutine\parallel', 'parallel', ]; protected static array $breakFunctions = [ 'Multiplex\Socket\Client->loop', 'Multiplex\Socket\Client->heartbeat', 'FriendsOfHyperf\Sentry\HttpClient\HttpClient->loop', + 'FriendsOfHyperf\Sentry\Transport\CoHttpTransport->loop', 'Hyperf\Kafka\Producer->loop', 'Hyperf\Metric\Listener\OnMetricFactoryReady->process', 'Hyperf\Metric\Listener\QueueWatcher->process',