Skip to content

Commit d034be1

Browse files
committed
Add SDK information for sentry-symfony
1 parent e70d4e5 commit d034be1

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

src/Sentry/SentryBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function getConfigTreeBuilder()
2626
->defaultNull()
2727
->end()
2828
->scalarNode('client')
29-
->defaultValue('Raven_Client')
29+
->defaultValue('Sentry\SentryBundle\SentrySymfonyClient')
3030
->end()
3131
->scalarNode('environment')
3232
->defaultValue('%kernel.environment%')

src/Sentry/SentryBundle/EventListener/ExceptionListener.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Sentry\SentryBundle\EventListener;
44

5+
use Sentry\SentryBundle;
56
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
67
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
78
use Symfony\Component\HttpKernel\HttpKernelInterface;
@@ -42,7 +43,7 @@ public function __construct(
4243
array $skipCapture
4344
) {
4445
if (!$client) {
45-
$client = new \Raven_Client();
46+
$client = new SentrySymfonyClient();
4647
}
4748

4849
$this->tokenStorage = $tokenStorage;

src/Sentry/SentryBundle/SentryBundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
use Symfony\Component\HttpKernel\Bundle\Bundle;
66

7-
class SentryBundle extends Bundle
8-
{
7+
class SentryBundle extends Bundle {
8+
const VERSION = '0.4.0';
99
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Sentry\SentryBundle;
4+
5+
class SentrySymfonyClient extends \Raven_Client
6+
{
7+
public function __construct($dsn=null, $options=array())
8+
{
9+
$options['sdk'] = array(
10+
'name' => 'sentry-symfony',
11+
'version' => SentryBundle::VERSION,
12+
);
13+
parent::__construct($dsn, $options);
14+
}
15+
}

0 commit comments

Comments
 (0)