Sha256: 93405752b59c53519cdebc266adeaad81e2974e8806c37b4e6cab1a6ed1f254b

Contents?: true

Size: 622 Bytes

Versions: 8

Compression:

Stored size: 622 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
    { :fingerprint => ["{{ default }}", env["REQUEST_URI"]] }
  end
end

Rack::Timeout::Error.include RackTimeoutExtensions
Rack::Timeout::RequestTimeoutException.include RackTimeoutExtensions

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sentry-raven-2.7.1 lib/raven/integrations/rack-timeout.rb
sentry-raven-2.6.3 lib/raven/integrations/rack-timeout.rb
sentry-raven-2.6.2 lib/raven/integrations/rack-timeout.rb
sentry-raven-2.6.1 lib/raven/integrations/rack-timeout.rb
sentry-raven-2.6.0 lib/raven/integrations/rack-timeout.rb
sentry-raven-2.5.3 lib/raven/integrations/rack-timeout.rb
sentry-raven-2.5.2 lib/raven/integrations/rack-timeout.rb
sentry-raven-2.5.1 lib/raven/integrations/rack-timeout.rb