summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Sentry.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-09-20 08:58:26 +0200
committerByron Jones <bjones@mozilla.com>2013-09-20 08:58:26 +0200
commitddaae0e3bad3cde9bb5038308c242273a6e7b449 (patch)
treea1d6cb9c8ac37e1906742c69a756b2122c7158b8 /Bugzilla/Sentry.pm
parent607415d6cf299bc7b57e10b825e881058d439ba3 (diff)
downloadbugzilla-ddaae0e3bad3cde9bb5038308c242273a6e7b449.tar.gz
bugzilla-ddaae0e3bad3cde9bb5038308c242273a6e7b449.tar.xz
Bug 918644: ignore "Use of uninitialized value $compiled in concatenation (.) or string at /usr/lib64/perl5/Template/Provider.pm line 572." warnings
Diffstat (limited to 'Bugzilla/Sentry.pm')
-rw-r--r--Bugzilla/Sentry.pm17
1 files changed, 15 insertions, 2 deletions
diff --git a/Bugzilla/Sentry.pm b/Bugzilla/Sentry.pm
index ac053d992..d2994e78b 100644
--- a/Bugzilla/Sentry.pm
+++ b/Bugzilla/Sentry.pm
@@ -46,8 +46,16 @@ use constant CONFIG => {
token_generation_error
)],
- # any error messages matching these regex's will not be sent to sentry
+ # any error/warning messages matching these regex's will not be logged or
+ # sent to sentry
ignore => [
+ qr/^compiled template :\s*$/,
+ qr/^Use of uninitialized value \$compiled in concatenation \(\.\) or string/,
+ ],
+
+ # any error/warning messages matching these regex's will be logged but not
+ # sent to sentry
+ sentry_ignore => [
qr/Software caused connection abort/,
qr/Could not check out .*\/cvsroot/,
qr/Unicode character \S+ is illegal/,
@@ -124,6 +132,11 @@ sub sentry_handle_error {
}
my $message = join(" ", map { trim($_) } grep { $_ ne '' } @message);
+ # message content filtering
+ foreach my $re (@{ CONFIG->{ignore} }) {
+ return 0 if $message =~ $re;
+ }
+
# determine logger
my $logger;
foreach my $config (@{ CONFIG->{logger} }) {
@@ -154,7 +167,7 @@ sub sentry_handle_error {
# message content filtering
if ($send_to_sentry) {
- foreach my $re (@{ CONFIG->{ignore} }) {
+ foreach my $re (@{ CONFIG->{sentry_ignore} }) {
if ($message =~ $re) {
$send_to_sentry = 0;
last;