Class: RailsObservatory::ActionMailerSubscriber
- Inherits:
-
ActiveSupport::Subscriber
- Object
- ActiveSupport::Subscriber
- RailsObservatory::ActionMailerSubscriber
- Defined in:
- lib/rails_observatory/action_mailer_subscriber.rb
Instance Method Summary collapse
Instance Method Details
#deliver(event) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/rails_observatory/action_mailer_subscriber.rb', line 6 def deliver(event) event.payload => {mail:, mailer:, to:, from:, subject:, message_id:} MailDelivery.new(mail:, mailer:, to:, from:, subject:, message_id:, time: Time.now.to_f, duration: event.duration).save TimeSeries.record_occurrence("mailer.delivery_count", labels: {mailer:}) end |