Sha256: f6bc2f377ac93b370aa5903dc74f668c81737f1c64714dfe5475dd85f8013478
Contents?: true
Size: 966 Bytes
Versions: 15
Compression:
Stored size: 966 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/agent/transaction_state' require 'new_relic/agent/instrumentation/controller_instrumentation' require 'new_relic/agent/instrumentation/middleware_tracing' module NewRelic module Rack class AgentMiddleware include Agent::Instrumentation::MiddlewareTracing attr_reader :transaction_options, :category, :target def initialize(app, options={}) @app = app @category = :middleware @target = self @transaction_options = { :transaction_name => build_transaction_name } end def build_transaction_name prefix = ::NewRelic::Agent::Instrumentation::ControllerInstrumentation::TransactionNamer.prefix_for_category(nil, @category) "#{prefix}#{self.class.name}/call" end end end end
Version data entries
15 entries across 15 versions & 1 rubygems