diff options
author | Sean McGivern <sean@gitlab.com> | 2017-04-20 11:32:10 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-04-20 11:32:10 +0100 |
commit | 57edc23385ad82d4428ba34f342aee07cb2d2ba6 (patch) | |
tree | 14d67ab38012e7c4f1b8719888681c3987ae3062 /lib | |
parent | 29ddc15f8d9b094bb7052875f7728ee48f7ad06b (diff) | |
download | gitlab-ce-57edc23385ad82d4428ba34f342aee07cb2d2ba6.tar.gz |
Add metrics events for incoming emails
This lets us track how many incoming emails a GitLab instance is processing, by
email type (handler) and by project (where applicable).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/email/receiver.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb index ec0529b5a4b..bb4fdd1f1f4 100644 --- a/lib/gitlab/email/receiver.rb +++ b/lib/gitlab/email/receiver.rb @@ -32,6 +32,10 @@ module Gitlab raise UnknownIncomingEmail unless handler + Gitlab::Metrics.add_event(:receive_email, + project: handler.try(:project), + handler: handler.class.name) + handler.execute end |