Sha256: 02980184e94c68fd26ab605af0360e462e391fc90170ac6cf93d711f6c6b0c15
Contents?: true
Size: 827 Bytes
Versions: 33
Compression:
Stored size: 827 Bytes
Contents
module Appsignal module Rack class Instrumentation def initialize(app, options = {}) Appsignal.logger.debug 'Initializing Appsignal::Rack::Instrumentation' @app, @options = app, options end def call(env) ActiveSupport::Notifications.instrument( 'process_action.rack', raw_payload(env) ) do |payload| @app.call(env) end end def raw_payload(env) request = @options.fetch(:request_class, ::Rack::Request).new(env) params = request.public_send(@options.fetch(:params_method, :params)) { :action => "#{request.request_method}:#{request.path}", :params => params, :method => request.request_method, :path => request.path } end end end end
Version data entries
33 entries across 33 versions & 1 rubygems