Sha256: 7589eca6db3293620efc1195edc3e1748160fb7820d614a02006f812ccf4bfcc

Contents?: true

Size: 684 Bytes

Versions: 30

Compression:

Stored size: 684 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

require 'new_relic/metric_parser'

module NewRelic
  module MetricParser
    class Middleware < MetricParser
      ALL  = 'Middleware/all'.freeze
      RACK = 'Rack'.freeze

      def ui_name(value_fn=nil,options={})
        if metric_name == ALL
          "Middleware"
        else
          "#{segments[2]}\##{segments[3]}"
        end
      end

      def is_middleware?
        true
      end

      def controller_name
        segments[2]
      end

      def action_name
        segments[3]
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
newrelic_rpm-3.9.9.275 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
newrelic_rpm-3.9.8.273 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
newrelic_rpm-3.9.7.266 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
newrelic_rpm-3.9.6.257 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
newrelic_rpm-3.9.5.251 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
newrelic_rpm-3.9.4.245 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
newrelic_rpm-3.9.3.241 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
newrelic_rpm-3.9.2.239 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
newrelic_rpm-3.9.1.236 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
newrelic_rpm-3.9.0.229 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb