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 575b170
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Classes/Service/Sentry.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ 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 575b170

Please sign in to comment.