We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7f9077 commit 149d9e7Copy full SHA for 149d9e7
1 file changed
src/sentry/src/Metrics/Listener/OnBeforeHandle.php
@@ -14,6 +14,7 @@
14
use FriendsOfHyperf\Sentry\Constants;
15
use FriendsOfHyperf\Sentry\Feature;
16
use FriendsOfHyperf\Sentry\Metrics\Traits\MetricSetter;
17
+use FriendsOfHyperf\Sentry\SentryContext;
18
use Hyperf\Command\Event\BeforeHandle;
19
use Hyperf\Coordinator\CoordinatorManager;
20
use Hyperf\Coordinator\Timer;
@@ -48,6 +49,7 @@ public function process(object $event): void
48
49
{
50
if (
51
! $event instanceof BeforeHandle
52
+ || SentryContext::getCronCheckInId() // Prevent duplicate metrics in cron job.
53
|| ! $event->getCommand()->getApplication()->isAutoExitEnabled() // Only enable in the command with auto exit.
54
|| ! $this->feature->isCommandMetricsEnabled()
55
) {
0 commit comments