Sha256: c8e26a8ecb48c7ac957c6ca5eacb5113bc2d396b2965ff35f13d301ec0949d44

Contents?: true

Size: 1.12 KB

Versions: 6

Compression:

Stored size: 1.12 KB

Contents

require 'jellyfish'
require 'rack/request'
require 'new_relic/agent/instrumentation/controller_instrumentation'

module Jellyfish
  module NewRelic
    include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation

    def block_call argument, block
      path = if argument.respond_to?(:regexp)
               argument.regexp
             else
               argument
             end.to_s[1..-1]
      name = "#{env['REQUEST_METHOD']} #{path}"
        # magic category: NewRelic::MetricParser::WebTransaction::Jellyfish
      perform_action_with_newrelic_trace(:category => 'Controller/Jellyfish',
                                         :path     => path                  ,
                                         :name     => name                  ,
                                         :request  => request               ,
                                         :params   => request.params){super}
    end
  end
end

module NewRelic::MetricParser::WebTransaction::Jellyfish
  include NewRelic::MetricParser::WebTransaction::Pattern
  def is_web_transaction?;        true; end
  def category           ; 'Jellyfish'; end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jellyfish-1.0.1 lib/jellyfish/newrelic.rb
jellyfish-1.0.0 lib/jellyfish/newrelic.rb
jellyfish-0.9.2 lib/jellyfish/newrelic.rb
jellyfish-0.9.1 lib/jellyfish/newrelic.rb
jellyfish-0.9.0 lib/jellyfish/newrelic.rb
jellyfish-0.8.0 lib/jellyfish/newrelic.rb