Method: OneApm::Rack::MiddlewareWrapper#determine_class_name
- Defined in:
- lib/one_apm/rack/middleware_wrapper.rb
#determine_class_name ⇒ Object
In ‘normal’ usage, the target will be an application instance that responds to #call. With Rails, however, the target may be a subclass of Rails::Application that defines a method_missing that proxies #call to a singleton instance of the the subclass. We need to ensure that we capture the correct name in both cases.
83 84 85 86 87 88 89 |
# File 'lib/one_apm/rack/middleware_wrapper.rb', line 83 def determine_class_name if @target.is_a?(Class) @target.name else @target.class.name end end |