Skip to content

Commit

Permalink
Add SDK information for sentry-symfony
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Jul 21, 2016
1 parent e70d4e5 commit d034be1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getConfigTreeBuilder()
->defaultNull()
->end()
->scalarNode('client')
->defaultValue('Raven_Client')
->defaultValue('Sentry\SentryBundle\SentrySymfonyClient')
->end()
->scalarNode('environment')
->defaultValue('%kernel.environment%')
Expand Down
3 changes: 2 additions & 1 deletion src/Sentry/SentryBundle/EventListener/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Sentry\SentryBundle\EventListener;

use Sentry\SentryBundle;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;
Expand Down Expand Up @@ -42,7 +43,7 @@ public function __construct(
array $skipCapture
) {
if (!$client) {
$client = new \Raven_Client();
$client = new SentrySymfonyClient();
}

$this->tokenStorage = $tokenStorage;
Expand Down
4 changes: 2 additions & 2 deletions src/Sentry/SentryBundle/SentryBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

use Symfony\Component\HttpKernel\Bundle\Bundle;

class SentryBundle extends Bundle
{
class SentryBundle extends Bundle {
const VERSION = '0.4.0';
}
15 changes: 15 additions & 0 deletions src/Sentry/SentryBundle/SentrySymfonyClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Sentry\SentryBundle;

class SentrySymfonyClient extends \Raven_Client
{
public function __construct($dsn=null, $options=array())
{
$options['sdk'] = array(
'name' => 'sentry-symfony',
'version' => SentryBundle::VERSION,
);
parent::__construct($dsn, $options);
}
}

0 comments on commit d034be1

Please sign in to comment.