Skip to content

Commit

Permalink
πŸ› fix SentryHub singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanti committed Aug 16, 2023
1 parent af34a83 commit 682384d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Classes/Service/Sentry.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ protected function setup(): void
$options['release'] = shell_exec('git rev-parse HEAD');
}

$builder = ClientBuilder::create(array_filter($options));
if ($this->config->isQueueEnabled()) {
$builder = ClientBuilder::create(array_filter($options));
$builder->setTransportFactory(new TransportFactory());
SentrySdk::getCurrentHub()->bindClient($builder->getClient());
} else {
init(array_filter($options));
}

SentrySdk::getCurrentHub()->bindClient($builder->getClient());

configureScope(fn(Scope $scope) => $this->scopeConfig->apply($scope));
}

Expand Down

0 comments on commit 682384d

Please sign in to comment.