class Honeybadger::Instrumentation

Honeybadger::Instrumentation defines the API for collecting metric data from anywhere in an application. These class methods may be used directly, or from the Honeybadger singleton instance. There are three usage variations as show in the example below:

@example class TicketsController < ApplicationController def create # pass a block Honeybadger.time(‘create.ticket’) { Ticket.create(params) }

    # pass a lambda argument
    Honeybadger.time 'create.ticket', ->{ Ticket.create(params[:ticket]) }

    # pass the duration argument
    duration = timing_method { Ticket.create(params[:ticket]) }
    Honeybadger.time 'create.ticket', duration: duration
  end
end