class AppDynamics::ErrorHandler
Rack Middleware
for tracking unhandled exceptions
Public Class Methods
new(app)
click to toggle source
# File lib/app_dynamics/error_handler.rb, line 5 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/app_dynamics/error_handler.rb, line 9 def call(env) @app.call(env) rescue Exception => e track_exception(e) raise e end
Private Instance Methods
track_exception(e)
click to toggle source
# File lib/app_dynamics/error_handler.rb, line 18 def track_exception(e) return unless instance = AppDynamics.instrumenter return unless trace = instance.current_trace trace.native_set_exception(e) end