File tree Expand file tree Collapse file tree 5 files changed +19
-2
lines changed Expand file tree Collapse file tree 5 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -112,3 +112,12 @@ sentry:
112
112
skip_capture :
113
113
- " Symfony\\ Component\\ HttpKernel\\ Exception\\ HttpExceptionInterface"
114
114
` ` `
115
+
116
+ ### error types
117
+
118
+ Define which error types should be reported.
119
+
120
+ ` ` ` yaml
121
+ sentry :
122
+ error_types : E_ALL & ~E_DEPRECATED & ~E_NOTICE
123
+ ` ` `
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ public function getConfigTreeBuilder()
34
34
->scalarNode ('dsn ' )
35
35
->defaultNull ()
36
36
->end ()
37
+ ->scalarNode ('error_types ' )
38
+ ->defaultNull ()
39
+ ->end ()
37
40
->scalarNode ('exception_listener ' )
38
41
->defaultValue ('Sentry\SentryBundle\EventListener\ExceptionListener ' )
39
42
->end ()
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ private function convertErrorConstants($expression)
56
56
57
57
/**
58
58
* Let PHP compute the prepared expression for us.
59
- *
59
+ *
60
60
* @param string $expression prepared expression e.g. 32767&~8192&~8
61
61
* @return int computed expression e.g. 24567
62
62
*/
Original file line number Diff line number Diff line change 1
1
services :
2
2
sentry.client :
3
3
class : ' %sentry.client%'
4
- arguments : ['%sentry.dsn%']
4
+ arguments : ['%sentry.dsn%', {'errro_types': '%sentry.error_types%'} ]
5
5
calls :
6
6
- [setRelease, ['%sentry.release%']]
7
7
- [setEnvironment, ['%sentry.environment%']]
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ class SentrySymfonyClient extends \Raven_Client
6
6
{
7
7
public function __construct ($ dsn =null , $ options =array ())
8
8
{
9
+ if (array_key_exists ('error_types ' , $ options )) {
10
+ $ exParser = new ErrorTypesParser ($ options ['error_types ' ]);
11
+ $ options ['error_types ' ] = $ ex ->parse ();
12
+ }
13
+
9
14
$ options ['sdk ' ] = array (
10
15
'name ' => 'sentry-symfony ' ,
11
16
'version ' => SentryBundle::VERSION ,
You can’t perform that action at this time.
0 commit comments