From bc31fe722c04724cc4fea6e14e042eff0e3d10ed Mon Sep 17 00:00:00 2001 From: Mars Date: Fri, 5 Oct 2018 19:02:55 -0400 Subject: 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. --- extensions/PhabBugz/lib/Feed.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 { -- cgit v1.2.3-24-g4f1b