From: Mars Date: Fri, 5 Oct 2018 23:02:55 +0000 (-0400) Subject: Bug 1496832 - Add monitoring for feed daemon becoming unresponsive X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc31fe722c04724cc4fea6e14e042eff0e3d10ed;p=thirdparty%2Fbugzilla.git Bug 1496832 - Add monitoring for feed daemon becoming unresponsive 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. --- diff --git a/extensions/PhabBugz/lib/Feed.pm b/extensions/PhabBugz/lib/Feed.pm index b338e9a72..d8d4d6921 100644 --- a/extensions/PhabBugz/lib/Feed.pm +++ b/extensions/PhabBugz/lib/Feed.pm @@ -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 {