Class: Honeycomb::Rails::Middleware

Inherits:
Object
  • Object
show all
Includes:
Honeycomb::Rack, Honeycomb::Rails, Warden
Defined in:
lib/honeycomb/integrations/rails.rb

Overview

Rails middleware

Constant Summary

Constants included from Warden

Warden::COMMON_USER_FIELDS, Warden::SCOPE_PATTERN

Constants included from Honeycomb::Rack

Honeycomb::Rack::RACK_FIELDS

Instance Attribute Summary

Attributes included from Honeycomb::Rack

#app, #client

Instance Method Summary collapse

Methods included from Honeycomb::Rails

#add_package_information

Methods included from Warden

#extract_user_information

Methods included from Honeycomb::Rack

#add_package_information, #call, #extract_fields, #initialize

Instance Method Details

#call_with_hook(env, span, &_add_field) ⇒ Object



93
94
95
96
97
98
99
100
101
# File 'lib/honeycomb/integrations/rails.rb', line 93

def call_with_hook(env, span, &_add_field)
  super
rescue StandardError => e
  wrapped = ActionDispatch::ExceptionWrapper.new(nil, e)

  span.add_field "response.status_code", wrapped.status_code

  raise e
end