From 6cce8a1b95c36dd4b8fb019ccbef89f73b94bf04 Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Fri, 27 Feb 2026 18:36:40 +0800 Subject: [PATCH 1/8] feat(sentry): add SentrySdkAspect for coroutine-safe SDK usage Add an aspect that intercepts SentrySdk::init, ::setCurrentHub, and ::getRuntimeContextManager to make them coroutine-safe using Hyperf's Context API and RuntimeContextManager. This ensures that Sentry SDK works correctly in a coroutine environment by storing the runtime context manager in Hyperf's context storage. --- src/sentry/src/Aspect/SentrySdkAspect.php | 70 +++++++++++++++++++++++ src/sentry/src/ConfigProvider.php | 1 + 2 files changed, 71 insertions(+) create mode 100644 src/sentry/src/Aspect/SentrySdkAspect.php diff --git a/src/sentry/src/Aspect/SentrySdkAspect.php b/src/sentry/src/Aspect/SentrySdkAspect.php new file mode 100644 index 000000000..bb26b95c1 --- /dev/null +++ b/src/sentry/src/Aspect/SentrySdkAspect.php @@ -0,0 +1,70 @@ +methodName) { + 'init' => $this->handleInit($proceedingJoinPoint), + 'setCurrentHub' => $this->handleSetCurrentHub($proceedingJoinPoint), + 'getRuntimeContextManager' => $this->handleGetRuntimeContextManager($proceedingJoinPoint), + default => $proceedingJoinPoint->process(), + }; + } + + private function handleInit(ProceedingJoinPoint $proceedingJoinPoint) + { + Context::set( + RuntimeContextManager::class, + new RuntimeContextManager(make(HubInterface::class)) + ); + + return SentrySdk::getCurrentHub(); + } + + private function handleSetCurrentHub(ProceedingJoinPoint $proceedingJoinPoint) + { + $arguments = $proceedingJoinPoint->arguments ?? []; + $hub = $arguments['hub']; + // @phpstan-ignore-next-line + Closure::bind(fn () => static::getRuntimeContextManager()->setCurrentHub($hub), null, SentrySdk::class)(); + + return $hub; + } + + private function handleGetRuntimeContextManager(ProceedingJoinPoint $proceedingJoinPoint) + { + return Context::getOrSet( + RuntimeContextManager::class, + fn () => new RuntimeContextManager(make(HubInterface::class)) + ); + } +} diff --git a/src/sentry/src/ConfigProvider.php b/src/sentry/src/ConfigProvider.php index e101e53cb..3b3c04646 100644 --- a/src/sentry/src/ConfigProvider.php +++ b/src/sentry/src/ConfigProvider.php @@ -28,6 +28,7 @@ public function __invoke(): array Aspect\LoggerAspect::class, Aspect\RedisAspect::class, // Aspect\SingletonAspect::class, + Aspect\SentrySdkAspect::class, Metrics\Aspect\CounterAspect::class, Metrics\Aspect\HistogramAspect::class, Tracing\Aspect\AmqpProducerAspect::class, From 78999fb10ec55cd66800a5a58b15fd016c22d451 Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Fri, 27 Feb 2026 18:38:16 +0800 Subject: [PATCH 2/8] feat(sentry): remove SentrySdk class_map as aspect now handles it --- src/sentry/src/ConfigProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentry/src/ConfigProvider.php b/src/sentry/src/ConfigProvider.php index 3b3c04646..35f454be6 100644 --- a/src/sentry/src/ConfigProvider.php +++ b/src/sentry/src/ConfigProvider.php @@ -77,7 +77,7 @@ public function __invoke(): array 'annotations' => [ 'scan' => [ 'class_map' => [ - \Sentry\SentrySdk::class => __DIR__ . '/../class_map/SentrySdk.php', + // \Sentry\SentrySdk::class => __DIR__ . '/../class_map/SentrySdk.php', ], ], ], From 8d0c644a73c941dc6895403dd143ef8e47988698 Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Fri, 27 Feb 2026 18:38:32 +0800 Subject: [PATCH 3/8] deps: update sentry/sentry to ^4.21.0 --- composer.json | 4 ++-- src/sentry/composer.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 0c231b823..e4eeefcd1 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "psr/http-factory-implementation": "*", "psy/psysh": "^0.10.0 || ^0.11.0", "ramsey/uuid": "^4.7", - "sentry/sentry": "^4.19.0", + "sentry/sentry": "^4.21.0", "symfony/console": "^5.3 || ^6.0 || ^7.0", "symfony/http-foundation": "^5.3 || ^6.0 || ^7.0", "symfony/polyfill-php84": "^1.33", @@ -330,4 +330,4 @@ "test:types": "@php vendor/bin/pest --type-coverage", "test:unit": "@php vendor/bin/pest" } -} +} \ No newline at end of file diff --git a/src/sentry/composer.json b/src/sentry/composer.json index 0390dddfb..fedcfd358 100644 --- a/src/sentry/composer.json +++ b/src/sentry/composer.json @@ -33,7 +33,7 @@ "hyperf/http-server": "~3.1.0", "hyperf/support": "~3.1.0", "hyperf/tappable": "~3.1.0", - "sentry/sentry": "^4.19.0", + "sentry/sentry": "^4.21.0", "symfony/polyfill-php85": "^1.33" }, "suggest": { @@ -65,4 +65,4 @@ "config": "FriendsOfHyperf\\Sentry\\ConfigProvider" } } -} +} \ No newline at end of file From 5f543e6f53237deaa11840db597f4443de189009 Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Fri, 27 Feb 2026 18:44:38 +0800 Subject: [PATCH 4/8] fix(sentry): fix arguments access in SentrySdkAspect --- src/sentry/src/Aspect/SentrySdkAspect.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentry/src/Aspect/SentrySdkAspect.php b/src/sentry/src/Aspect/SentrySdkAspect.php index bb26b95c1..2f776c1d9 100644 --- a/src/sentry/src/Aspect/SentrySdkAspect.php +++ b/src/sentry/src/Aspect/SentrySdkAspect.php @@ -52,7 +52,7 @@ private function handleInit(ProceedingJoinPoint $proceedingJoinPoint) private function handleSetCurrentHub(ProceedingJoinPoint $proceedingJoinPoint) { - $arguments = $proceedingJoinPoint->arguments ?? []; + $arguments = $proceedingJoinPoint->arguments['keys'] ?? []; $hub = $arguments['hub']; // @phpstan-ignore-next-line Closure::bind(fn () => static::getRuntimeContextManager()->setCurrentHub($hub), null, SentrySdk::class)(); From 35252e705cc19cd71e12e6ce9d67f2b400a65391 Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Fri, 27 Feb 2026 18:48:45 +0800 Subject: [PATCH 5/8] refactor(sentry): remove unnecessary comment in SentrySdkAspect --- src/sentry/src/Aspect/SentrySdkAspect.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sentry/src/Aspect/SentrySdkAspect.php b/src/sentry/src/Aspect/SentrySdkAspect.php index 2f776c1d9..6416424e0 100644 --- a/src/sentry/src/Aspect/SentrySdkAspect.php +++ b/src/sentry/src/Aspect/SentrySdkAspect.php @@ -31,7 +31,6 @@ class SentrySdkAspect extends AbstractAspect public function process(ProceedingJoinPoint $proceedingJoinPoint) { - // Do nothing, just for class mapping. return match ($proceedingJoinPoint->methodName) { 'init' => $this->handleInit($proceedingJoinPoint), 'setCurrentHub' => $this->handleSetCurrentHub($proceedingJoinPoint), From 7949d639d7880f4fe8021d50c6600d7f4c5f5f8f Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Tue, 10 Mar 2026 09:20:33 +0800 Subject: [PATCH 6/8] feat(sentry): replace Integration::flushEvents() with SentrySdk::flush() for improved event flushing --- src/sentry/src/Aspect/CoroutineAspect.php | 3 +-- src/sentry/src/Integration.php | 6 +----- src/sentry/src/Metrics/Listener/OnBeforeHandle.php | 5 ++--- src/sentry/src/Metrics/Listener/OnCoroutineServerStart.php | 5 ++--- src/sentry/src/Metrics/Listener/OnMetricFactoryReady.php | 5 ++--- src/sentry/src/Metrics/Listener/OnWorkerStart.php | 5 ++--- src/sentry/src/Metrics/Listener/PoolWatcher.php | 5 ++--- src/sentry/src/Metrics/Listener/QueueWatcher.php | 5 ++--- src/sentry/src/Metrics/Timer.php | 3 ++- src/sentry/src/Tracing/Aspect/CoroutineAspect.php | 4 ++-- src/sentry/src/Tracing/Listener/EventHandleListener.php | 3 +-- 11 files changed, 19 insertions(+), 30 deletions(-) diff --git a/src/sentry/src/Aspect/CoroutineAspect.php b/src/sentry/src/Aspect/CoroutineAspect.php index a38865a3e..151c2cb70 100644 --- a/src/sentry/src/Aspect/CoroutineAspect.php +++ b/src/sentry/src/Aspect/CoroutineAspect.php @@ -11,7 +11,6 @@ namespace FriendsOfHyperf\Sentry\Aspect; -use FriendsOfHyperf\Sentry\Integration; use Hyperf\Context\Context; use Hyperf\Di\Aop\AbstractAspect; use Hyperf\Di\Aop\ProceedingJoinPoint; @@ -60,7 +59,7 @@ protected function handleCreate(ProceedingJoinPoint $proceedingJoinPoint): void } // Defer the flushing of events until the coroutine completes. - defer(fn () => Integration::flushEvents()); + defer(fn () => SentrySdk::flush()); // Continue the callable in the new Coroutine. $callable(); diff --git a/src/sentry/src/Integration.php b/src/sentry/src/Integration.php index 776ccd165..0b3b5dd9b 100644 --- a/src/sentry/src/Integration.php +++ b/src/sentry/src/Integration.php @@ -14,8 +14,6 @@ use Sentry\Breadcrumb; use Sentry\Event; use Sentry\Integration\IntegrationInterface; -use Sentry\Logs\Logs; -use Sentry\Metrics\TraceMetrics; use Sentry\SentrySdk; use Sentry\State\Scope; use Sentry\Tracing\Span; @@ -106,9 +104,7 @@ public static function setTransaction(?string $transaction): void */ public static function flushEvents(): void { - Logs::getInstance()->flush(); - TraceMetrics::getInstance()->flush(); - SentrySdk::getCurrentHub()->getClient()?->flush(); + SentrySdk::flush(); } /** diff --git a/src/sentry/src/Metrics/Listener/OnBeforeHandle.php b/src/sentry/src/Metrics/Listener/OnBeforeHandle.php index 82220efd6..74940eea5 100644 --- a/src/sentry/src/Metrics/Listener/OnBeforeHandle.php +++ b/src/sentry/src/Metrics/Listener/OnBeforeHandle.php @@ -13,7 +13,6 @@ use FriendsOfHyperf\Sentry\Constants; use FriendsOfHyperf\Sentry\Feature; -use FriendsOfHyperf\Sentry\Integration; use FriendsOfHyperf\Sentry\Metrics\Event\MetricFactoryReady; use FriendsOfHyperf\Sentry\Metrics\Traits\MetricSetter; use FriendsOfHyperf\Sentry\SentryContext; @@ -22,6 +21,7 @@ use Hyperf\Event\Contract\ListenerInterface; use Psr\Container\ContainerInterface; use Psr\EventDispatcher\EventDispatcherInterface; +use Sentry\SentrySdk; use Sentry\Unit; use function FriendsOfHyperf\Sentry\metrics; @@ -115,8 +115,7 @@ function () use ($metrics) { Unit::megabyte() ); - // metrics()->flush(); - Integration::flushEvents(); + SentrySdk::flush(); } ); } diff --git a/src/sentry/src/Metrics/Listener/OnCoroutineServerStart.php b/src/sentry/src/Metrics/Listener/OnCoroutineServerStart.php index 2e525be90..e7b28db88 100644 --- a/src/sentry/src/Metrics/Listener/OnCoroutineServerStart.php +++ b/src/sentry/src/Metrics/Listener/OnCoroutineServerStart.php @@ -12,7 +12,6 @@ namespace FriendsOfHyperf\Sentry\Metrics\Listener; use FriendsOfHyperf\Sentry\Feature; -use FriendsOfHyperf\Sentry\Integration; use FriendsOfHyperf\Sentry\Metrics\Event\MetricFactoryReady; use FriendsOfHyperf\Sentry\Metrics\Traits\MetricSetter; use Hyperf\Coordinator\Timer; @@ -20,6 +19,7 @@ use Hyperf\Server\Event\MainCoroutineServerStart; use Psr\Container\ContainerInterface; use Psr\EventDispatcher\EventDispatcherInterface; +use Sentry\SentrySdk; use Sentry\Unit; use function FriendsOfHyperf\Sentry\metrics; @@ -113,8 +113,7 @@ function () use ($metrics) { Unit::megabyte() ); - // metrics()->flush(); - Integration::flushEvents(); + SentrySdk::flush(); } ); } diff --git a/src/sentry/src/Metrics/Listener/OnMetricFactoryReady.php b/src/sentry/src/Metrics/Listener/OnMetricFactoryReady.php index c4cf57437..247e080eb 100644 --- a/src/sentry/src/Metrics/Listener/OnMetricFactoryReady.php +++ b/src/sentry/src/Metrics/Listener/OnMetricFactoryReady.php @@ -13,7 +13,6 @@ use FriendsOfHyperf\Sentry\Constants as SentryConstants; use FriendsOfHyperf\Sentry\Feature; -use FriendsOfHyperf\Sentry\Integration; use FriendsOfHyperf\Sentry\Metrics\CoroutineServerStats; use FriendsOfHyperf\Sentry\Metrics\Event\MetricFactoryReady; use FriendsOfHyperf\Sentry\Metrics\Traits\MetricSetter; @@ -22,6 +21,7 @@ use Hyperf\Event\Contract\ListenerInterface; use Hyperf\Support\System; use Psr\Container\ContainerInterface; +use Sentry\SentrySdk; use Sentry\Unit; use Swoole\Server as SwooleServer; @@ -130,8 +130,7 @@ function () use ($metrics, $serverStatsFactory, $workerId) { Unit::megabyte() ); - // metrics()->flush(); - Integration::flushEvents(); + SentrySdk::flush(); } ); } diff --git a/src/sentry/src/Metrics/Listener/OnWorkerStart.php b/src/sentry/src/Metrics/Listener/OnWorkerStart.php index cb99367c6..3a2638c6f 100644 --- a/src/sentry/src/Metrics/Listener/OnWorkerStart.php +++ b/src/sentry/src/Metrics/Listener/OnWorkerStart.php @@ -12,7 +12,6 @@ namespace FriendsOfHyperf\Sentry\Metrics\Listener; use FriendsOfHyperf\Sentry\Feature; -use FriendsOfHyperf\Sentry\Integration; use FriendsOfHyperf\Sentry\Metrics\Event\MetricFactoryReady; use FriendsOfHyperf\Sentry\Metrics\Traits\MetricSetter; use Hyperf\Coordinator\Timer; @@ -20,6 +19,7 @@ use Hyperf\Framework\Event\BeforeWorkerStart; use Psr\Container\ContainerInterface; use Psr\EventDispatcher\EventDispatcherInterface; +use Sentry\SentrySdk; use Sentry\Unit; use Swoole\Server; @@ -120,8 +120,7 @@ function () use ($metrics, $event) { Unit::megabyte() ); - // metrics()->flush(); - Integration::flushEvents(); + SentrySdk::flush(); } ); } diff --git a/src/sentry/src/Metrics/Listener/PoolWatcher.php b/src/sentry/src/Metrics/Listener/PoolWatcher.php index 44e9ab181..1c651cbaf 100644 --- a/src/sentry/src/Metrics/Listener/PoolWatcher.php +++ b/src/sentry/src/Metrics/Listener/PoolWatcher.php @@ -12,13 +12,13 @@ namespace FriendsOfHyperf\Sentry\Metrics\Listener; use FriendsOfHyperf\Sentry\Feature; -use FriendsOfHyperf\Sentry\Integration; use Hyperf\Coordinator\Timer; use Hyperf\Event\Contract\ListenerInterface; use Hyperf\Framework\Event\BeforeWorkerStart; use Hyperf\Pool\Pool; use Hyperf\Server\Event\MainCoroutineServerStart; use Psr\Container\ContainerInterface; +use Sentry\SentrySdk; use function FriendsOfHyperf\Sentry\metrics; @@ -90,8 +90,7 @@ function () use ($pool, $workerId, $poolName) { ] ); - // metrics()->flush(); - Integration::flushEvents(); + SentrySdk::flush(); } ); } diff --git a/src/sentry/src/Metrics/Listener/QueueWatcher.php b/src/sentry/src/Metrics/Listener/QueueWatcher.php index ebad472ce..70c93ec5e 100644 --- a/src/sentry/src/Metrics/Listener/QueueWatcher.php +++ b/src/sentry/src/Metrics/Listener/QueueWatcher.php @@ -12,13 +12,13 @@ namespace FriendsOfHyperf\Sentry\Metrics\Listener; use FriendsOfHyperf\Sentry\Feature; -use FriendsOfHyperf\Sentry\Integration; use FriendsOfHyperf\Sentry\Metrics\Event\MetricFactoryReady; use Hyperf\AsyncQueue\Driver\DriverFactory; use Hyperf\Contract\ConfigInterface; use Hyperf\Coordinator\Timer; use Hyperf\Event\Contract\ListenerInterface; use Psr\Container\ContainerInterface; +use Sentry\SentrySdk; use function FriendsOfHyperf\Sentry\metrics; @@ -84,8 +84,7 @@ function () { ); } - // metrics()->flush(); - Integration::flushEvents(); + SentrySdk::flush(); } ); } diff --git a/src/sentry/src/Metrics/Timer.php b/src/sentry/src/Metrics/Timer.php index 5cdefb53b..7818c6e92 100644 --- a/src/sentry/src/Metrics/Timer.php +++ b/src/sentry/src/Metrics/Timer.php @@ -11,6 +11,7 @@ namespace FriendsOfHyperf\Sentry\Metrics; +use Sentry\SentrySdk; use Sentry\Unit; use function FriendsOfHyperf\Sentry\metrics; @@ -55,7 +56,7 @@ public function end(bool $flush = false): void $this->unit ?? Unit::second() ); - $flush && metrics()->flush(); + $flush && SentrySdk::flush(); $this->ended = true; } diff --git a/src/sentry/src/Tracing/Aspect/CoroutineAspect.php b/src/sentry/src/Tracing/Aspect/CoroutineAspect.php index 6f64274c0..7e3471826 100644 --- a/src/sentry/src/Tracing/Aspect/CoroutineAspect.php +++ b/src/sentry/src/Tracing/Aspect/CoroutineAspect.php @@ -12,13 +12,13 @@ namespace FriendsOfHyperf\Sentry\Tracing\Aspect; use FriendsOfHyperf\Sentry\Feature; -use FriendsOfHyperf\Sentry\Integration; use FriendsOfHyperf\Sentry\SentryContext; use FriendsOfHyperf\Sentry\Util\CoroutineBacktraceHelper; use Hyperf\Context\Context; use Hyperf\Di\Aop\AbstractAspect; use Hyperf\Di\Aop\ProceedingJoinPoint; use Hyperf\Engine\Coroutine as Co; +use Sentry\SentrySdk; use Sentry\State\Scope; use Sentry\Tracing\SpanContext; @@ -82,7 +82,7 @@ function (Scope $scope) use ($proceedingJoinPoint, $callingOnFunction) { // Defer the finishing of the transaction and flushing of events until the coroutine completes. defer(function () use ($transaction) { $transaction->finish(); - Integration::flushEvents(); + SentrySdk::flush(); }); return trace( diff --git a/src/sentry/src/Tracing/Listener/EventHandleListener.php b/src/sentry/src/Tracing/Listener/EventHandleListener.php index 978273b16..2d10cfe06 100644 --- a/src/sentry/src/Tracing/Listener/EventHandleListener.php +++ b/src/sentry/src/Tracing/Listener/EventHandleListener.php @@ -14,7 +14,6 @@ use Closure; use FriendsOfHyperf\Sentry\Constants; use FriendsOfHyperf\Sentry\Feature; -use FriendsOfHyperf\Sentry\Integration; use FriendsOfHyperf\Sentry\SentryContext; use FriendsOfHyperf\Sentry\Util\Carrier; use FriendsOfHyperf\Sentry\Util\CoContainer; @@ -454,7 +453,7 @@ protected function handleCommandFinished(CommandEvent\AfterExecute $event): void SentrySdk::getCurrentHub()->popScope(); } - Integration::flushEvents(); + SentrySdk::flush(); } } From 042ed4e18116ddba983cf72a229b5d363e4f04ac Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Tue, 10 Mar 2026 09:21:21 +0800 Subject: [PATCH 7/8] feat(sentry): remove SentrySdk class_map from ConfigProvider to streamline configuration --- src/sentry/class_map/SentrySdk.php | 65 ------------------------------ src/sentry/src/ConfigProvider.php | 4 +- 2 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 src/sentry/class_map/SentrySdk.php diff --git a/src/sentry/class_map/SentrySdk.php b/src/sentry/class_map/SentrySdk.php deleted file mode 100644 index 299a541a6..000000000 --- a/src/sentry/class_map/SentrySdk.php +++ /dev/null @@ -1,65 +0,0 @@ - Context::set(__CLASS__, $hub)); - } - - /** - * Gets the current hub. If it's not initialized then creates a new instance - * and sets it as current hub. - */ - public static function getCurrentHub(): HubInterface - { - return Context::getOrSet(__CLASS__, fn () => make(HubInterface::class)); - } - - /** - * Sets the current hub. - * - * @param HubInterface $hub The hub to set - */ - public static function setCurrentHub(HubInterface $hub): HubInterface - { - return Context::set(__CLASS__, $hub); - } -} diff --git a/src/sentry/src/ConfigProvider.php b/src/sentry/src/ConfigProvider.php index 35f454be6..a1be9bed8 100644 --- a/src/sentry/src/ConfigProvider.php +++ b/src/sentry/src/ConfigProvider.php @@ -76,9 +76,7 @@ public function __invoke(): array ], 'annotations' => [ 'scan' => [ - 'class_map' => [ - // \Sentry\SentrySdk::class => __DIR__ . '/../class_map/SentrySdk.php', - ], + 'class_map' => [], ], ], 'publish' => [ From 4ba375bae9101c0ee3b1b8508ab4fa28adc74437 Mon Sep 17 00:00:00 2001 From: Deeka Wong <8337659+huangdijia@users.noreply.github.com> Date: Tue, 10 Mar 2026 09:23:58 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20SentrySdk=20=E6=B7=B7?= =?UTF-8?q?=E5=85=A5=E6=B3=A8=E9=87=8A=E4=BB=A5=E6=8F=90=E7=A4=BA=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sentry/src/Aspect/SentrySdkAspect.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sentry/src/Aspect/SentrySdkAspect.php b/src/sentry/src/Aspect/SentrySdkAspect.php index 6416424e0..6954b1635 100644 --- a/src/sentry/src/Aspect/SentrySdkAspect.php +++ b/src/sentry/src/Aspect/SentrySdkAspect.php @@ -21,6 +21,9 @@ use function Hyperf\Support\make; +/** + * @mixin \Sentry\SentrySdk + */ class SentrySdkAspect extends AbstractAspect { public array $classes = [