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).
This commit is contained in:
Sean McGivern 2017-04-20 11:32:10 +01:00
parent 29ddc15f8d
commit 57edc23385
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
title: Add metrics events for incoming emails
merge_request:
author:

View File

@ -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