Module: Appsignal::Integrations::DryMonitorIntegration Private

Defined in:
lib/appsignal/integrations/dry_monitor.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

#instrument(event_id, payload = {}, &block) ⇒ 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.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/appsignal/integrations/dry_monitor.rb', line 7

def instrument(event_id, payload = {}, &block)
  Appsignal::Transaction.current.start_event

  super
ensure
  title, body, body_format = Appsignal::EventFormatter.format("#{event_id}.dry", payload)

  Appsignal::Transaction.current.finish_event(
    title || event_id.to_s,
    title,
    body,
    body_format
  )
end