Sha256: c94b048807946370f4fe06ce5dde2bbed10d20c041b0ddd101b0d4e37dcf5066

Contents?: true

Size: 521 Bytes

Versions: 7

Compression:

Stored size: 521 Bytes

Contents

module SystemMetrics
  module Instrument
    class ActionController < SystemMetrics::Instrument::Base

      def initialize
        super /\.action_controller$/
      end

      def ignore?(event)
        event.name != 'process_action.action_controller'
      end

      def prepare(event)
        event.payload[:end_point] = "#{event.payload.delete(:controller)}##{event.payload.delete(:action)}"
        event.payload.slice!(:path, :method, :params, :db_runtime, :view_runtime, :end_point)
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
system-metrics-0.2.5 lib/system_metrics/instrument/action_controller.rb
system-metrics-0.2.4 lib/system_metrics/instrument/action_controller.rb
system-metrics-0.2.3 lib/system_metrics/instrument/action_controller.rb
system-metrics-0.2.2 lib/system_metrics/instrument/action_controller.rb
system-metrics-0.2.1 lib/system_metrics/instrument/action_controller.rb
system-metrics-0.2.0 lib/system_metrics/instrument/action_controller.rb
system-metrics-0.1.0 lib/system_metrics/instrument/action_controller.rb