diff --git a/src/SentrySymfonyClient.php b/src/SentrySymfonyClient.php index 723d6c37..01b6f351 100644 --- a/src/SentrySymfonyClient.php +++ b/src/SentrySymfonyClient.php @@ -15,6 +15,7 @@ public function __construct($dsn = null, $options = []) 'name' => 'sentry-symfony', 'version' => SentryBundle::VERSION, ]; + $options['tags']['symfony_version'] = \Symfony\Component\HttpKernel\Kernel::VERSION; parent::__construct($dsn, $options); } diff --git a/test/SentrySymfonyClientTest.php b/test/SentrySymfonyClientTest.php index 8f82fa80..c103ff57 100644 --- a/test/SentrySymfonyClientTest.php +++ b/test/SentrySymfonyClientTest.php @@ -22,6 +22,7 @@ public function test_that_it_forwards_options() { $client = new SentrySymfonyClient('https://a:b@app.getsentry.com/project', [ 'name' => 'test', + 'tags' => ['some_custom' => 'test'], ]); $data = $client->get_default_data(); @@ -29,6 +30,8 @@ public function test_that_it_forwards_options() // Not a big fan of doing this kind of assertions, couples tests to external API... // Perhaps, refactor is needed for this class? $this->assertEquals('test', $data['server_name']); + $this->assertEquals(\Symfony\Component\HttpKernel\Kernel::VERSION, $data['tags']['symfony_version']); + $this->assertEquals('test', $data['tags']['some_custom']); $this->assertEquals('https://app.getsentry.com/api/project/store/', $client->getServerEndpoint(null)); $this->assertEquals('a', $client->public_key); $this->assertEquals('b', $client->secret_key);