Created
February 11, 2019 11:44
-
-
Save gmaliar/646812671b86de8cf1e5e015db58d0b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'prometheus/client' | |
prometheus = Prometheus::Client.registry | |
$email_job_retries = prometheus.counter(:http_requests, 'A counter of Email jobs that were retried') | |
ActiveSupport::Notifications.subscribe "enqueue_retry.active_job" do |name, start, finish, id, payload| | |
$email_job_retries.increment({ job: payload[:job] }) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment