Skip to content

Commit 6a3fa07

Browse files
committed
Fix not setting correct SDK ID/version when running test command
1 parent cad98d8 commit 6a3fa07

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Sentry/Laravel/Console/TestCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Support\Str;
88
use Psr\Log\AbstractLogger;
99
use Sentry\ClientBuilder;
10+
use Sentry\Laravel\Version;
1011
use Sentry\State\Hub;
1112
use Sentry\State\HubInterface;
1213
use Sentry\Tracing\SpanContext;
@@ -93,12 +94,17 @@ public function handle(): int
9394
'environment' => $laravelClient === null ? null : $laravelClient->getOptions()->getEnvironment(),
9495
'traces_sample_rate' => 1.0,
9596
]);
97+
9698
} catch (Exception $e) {
9799
$this->error($e->getMessage());
98100

99101
return 1;
100102
}
101103

104+
// Set the Laravel SDK identifier and version
105+
$clientBuilder->setSdkIdentifier(Version::SDK_IDENTIFIER);
106+
$clientBuilder->setSdkVersion(Version::SDK_VERSION);
107+
102108
// We set a logger so we can surface errors thrown internally by the SDK
103109
$clientBuilder->setLogger(new class($this) extends AbstractLogger {
104110
private $command;

0 commit comments

Comments
 (0)