Sha256: 6f4a3910911f611760bfb63db03af22b8a3b518ce970247b317ee920825b1982

Contents?: true

Size: 947 Bytes

Versions: 100

Compression:

Stored size: 947 Bytes

Contents

require 'new_relic/metric_parser'
# OtherTransaction metrics must have at least three segments: /OtherTransaction/<task>/*
# Task is "Background", "Resque", "DelayedJob" etc.
module NewRelic
  module MetricParser
    class OtherTransaction < NewRelic::MetricParser::MetricParser

      def is_transaction?
        true
      end
      def task
        segments[1]
      end

      def developer_name
        segments[2..-1].join(NewRelic::MetricParser::MetricParser::SEPARATOR)
      end

      def short_name
        developer_name
      end

      def drilldown_url(metric_id)
        {:controller => '/v2/background_tasks', :action => 'index', :task => task, :anchor => "id=#{metric_id}"}
      end

      def path
        segments[2..-1].join "/"
      end

      def summary_metrics
        if segments.size > 2
          %W[OtherTransaction/#{task}/all OtherTransaction/all]
        else
          []
        end
      end
    end
  end
end

Version data entries

100 entries across 100 versions & 5 rubygems

Version Path
newrelic_rpm-3.1.2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.2.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.2.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.1.beta3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.1.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.1.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
ghazel-newrelic_rpm-3.1.0.1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.0 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.0.beta5 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.0.beta4 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.0.djlogging2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.0.djlogging vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.0.beta3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.0.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.0.1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.1.0.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.0.0 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.0.0.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
newrelic_rpm-3.0.0.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb