Skip to content

Commit

Permalink
adding more information (url, browser info etc.) for sentry via sentr…
Browse files Browse the repository at this point in the history
…y/sdk
  • Loading branch information
Ivorius authored and f3l1x committed Apr 16, 2021
1 parent b165089 commit 8d783d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Sentry/SentryLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Contributte\Logging\Exceptions\Logical\InvalidStateException;
use Contributte\Logging\ILogger;
use Sentry\ClientBuilder;
use Sentry\SentrySdk;
use Sentry\Severity;
use Sentry\State\Scope;
use Throwable;
Expand Down Expand Up @@ -83,6 +84,7 @@ protected function makeRequest($message, Scope $scope): void
{
$client = ClientBuilder::create($this->configuration[self::CONFIG_OPTIONS] + ['dsn' => $this->configuration[self::CONFIG_URL]])
->getClient();
SentrySdk::init()->bindClient($client);

if ($message instanceof Throwable) {
$client->captureException($message, $scope);
Expand Down

0 comments on commit 8d783d3

Please sign in to comment.