class ScoutApm::Instruments::Grape
Attributes
context[R]
Public Class Methods
new(context)
click to toggle source
# File lib/scout_apm/instruments/grape.rb, line 6 def initialize(context) @context = context @installed = false end
Public Instance Methods
install()
click to toggle source
# File lib/scout_apm/instruments/grape.rb, line 19 def install if defined?(::Grape) && defined?(::Grape::Endpoint) @installed = true logger.info "Instrumenting Grape::Endpoint" ::Grape::Endpoint.class_eval do include ScoutApm::Instruments::GrapeEndpointInstruments alias run_without_scout_instruments run alias run run_with_scout_instruments end end end
installed?()
click to toggle source
# File lib/scout_apm/instruments/grape.rb, line 15 def installed? @installed end
logger()
click to toggle source
# File lib/scout_apm/instruments/grape.rb, line 11 def logger context.logger end