Module: Rack::Timeout::Rollbar
- Defined in:
- lib/rack/timeout/rollbar.rb
Overview
Groups timeout exceptions in rollbar by exception class, http method, and url. Usage: after requiring rollbar, call:
require "rack/timeout/rollbar"
This is somewhat experimental and very lightly tested.
Instance Method Summary collapse
Instance Method Details
#build_payload(level, message, exception, extra) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rack/timeout/rollbar.rb', line 10 def build_payload(level, , exception, extra) payload = super(level, , exception, extra) return payload unless exception.is_a? ::Rack::Timeout::ExceptionWithEnv return payload unless payload.respond_to? :[] data = payload["data"] return data unless data.respond_to? :[]= request = ::Rack::Request.new(exception.env) data["fingerprint"] = [ exception.class.name, request.request_method, request.fullpath ].join(" ") return payload end |