Sha256: 334ea6629d90537f8bb8049c365f1a9f091161851e68ca7d58c91f05ed495805
Contents?: true
Size: 816 Bytes
Versions: 4
Compression:
Stored size: 816 Bytes
Contents
# We need to do this because of the way integration loading works require "rack/timeout/base" unless defined?(Rack::Timeout) # This integration is a good example of how to change how exceptions # get grouped by Sentry's UI. Simply override #raven_context in # the exception class, and append something to the fingerprint # that will distinguish exceptions in the way you desire. module RackTimeoutExtensions def raven_context # Only rack-timeout 0.3.0+ provides the request environment, but we can't # gate this based on a gem version constant because rack-timeout does # not provide one. { :fingerprint => ["{{ default }}", env["REQUEST_URI"]] } if defined?(env) end end Rack::Timeout::Error.include(RackTimeoutExtensions) Rack::Timeout::RequestTimeoutException.include(RackTimeoutExtensions)
Version data entries
4 entries across 4 versions & 1 rubygems