Module: Appsignal::Integrations::ActiveSupportNotificationsIntegration::StartFinishHandlerIntegration 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_values(name, id, 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.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/appsignal/integrations/active_support_notifications.rb', line 66

def finish_with_values(name, id, 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

#startObject

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.



59
60
61
62
63
64
# File 'lib/appsignal/integrations/active_support_notifications.rb', line 59

def start
  instrument_this = @name[0] != ActiveSupportNotificationsIntegration::BANG

  Appsignal::Transaction.current.start_event if instrument_this
  super
end