]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1496832 - Add monitoring for feed daemon becoming unresponsive
authorMars <mfogels@gmail.com>
Fri, 5 Oct 2018 23:02:55 +0000 (19:02 -0400)
committerDylan William Hardison <dylan@hardison.net>
Fri, 5 Oct 2018 23:03:24 +0000 (19:03 -0400)
Use Datadog to count the number of times that jobs are run by the
phabbugz job scheduler.  This should catch problems if the process
responsible for running the jobs dies.

extensions/PhabBugz/lib/Feed.pm

index b338e9a72ec1b4963899b9e1d4af81d50db2a272..d8d4d69214f76bd21e6378814801e1888daed5a8 100644 (file)
@@ -220,6 +220,11 @@ sub feed_query {
 
         $delete_build_target->execute($target->{name}, $target->{value});
      }
+
+    if (Bugzilla->datadog) {
+      my $dd = Bugzilla->datadog();
+      $dd->increment('bugzilla.phabbugz.feed_query_count');
+    }
 }
 
 sub user_query {
@@ -260,6 +265,11 @@ sub user_query {
         };
         $self->save_last_id($user_id, 'user');
     }
+
+    if (Bugzilla->datadog) {
+      my $dd = Bugzilla->datadog();
+      $dd->increment('bugzilla.phabbugz.user_query_count');
+    }
 }
 
 sub group_query {
@@ -358,6 +368,11 @@ sub group_query {
             INFO( "Project " . $project->name . " updated" );
         }
     }
+
+    if (Bugzilla->datadog) {
+      my $dd = Bugzilla->datadog();
+      $dd->increment('bugzilla.phabbugz.group_query_count');
+    }
 }
 
 sub process_revision_change {