Module: Appsignal::Integrations::ActiveSupportNotificationsIntegration::FinishStateIntegration Private

Defined in:
lib/appsignal/integrations/active_support_notifications.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#finish_with_state(listeners_state, name, payload = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/appsignal/integrations/active_support_notifications.rb', line 85

def finish_with_state(listeners_state, name, payload = {})
  # Events that start with a bang are internal to Rails
  instrument_this = name[0] != ActiveSupportNotificationsIntegration::BANG

  if instrument_this
    title, body, body_format = Appsignal::EventFormatter.format(name, payload)
    Appsignal::Transaction.current.finish_event(
      name.to_s,
      title,
      body,
      body_format
    )
  end

  super
end