A Handle
is used to record the start and finish time of event.
Both start
and finish
must each be called exactly once.
Where possible, it’s best to use the block form: ActiveSupport::Notifications.instrument
. Handle
is a low-level API intended for cases where the block form can’t be used.
handle = ActiveSupport::Notifications.instrumenter.build_handle("my.event", {}) begin handle.start # work to be instrumented ensure handle.finish end
Methods