]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Count the number and type of phabbugz query timeouts
authorMars <mfogels@gmail.com>
Fri, 19 Oct 2018 13:36:15 +0000 (09:36 -0400)
committerdklawren <dklawren@users.noreply.github.com>
Fri, 19 Oct 2018 13:36:15 +0000 (09:36 -0400)
extensions/PhabBugz/lib/Feed.pm

index 48171652fdf2fccc62cf0fe2f0ea138c684d0cdc..184da39105a0b922b9c0ea4a86fc5b1f5f96d605 100644 (file)
@@ -79,6 +79,12 @@ sub start {
         name => 'ALRM',
         on_receipt => sub {
             FATAL("Timeout reached while executing $CURRENT_QUERY query");
+
+            if (my $dd = Bugzilla->datadog) {
+                my $lcname = lc $CURRENT_QUERY;
+                $dd->increment("bugzilla.phabbugz.${lcname}_query_timeouts");
+            }
+
             exit 1;
         },
     );