Permalink
Browse files

Adding additional logging to help diagnose case 26992

  • Loading branch information...
1 parent 122f29b commit 75c56b1780c0387ceaf851baec06d770f65584d0 @benweint benweint committed Feb 28, 2013
View
1 lib/new_relic/agent/instrumentation/controller_instrumentation.rb
@@ -260,6 +260,7 @@ def perform_action_with_newrelic_trace(*args, &block)
frame_data = _push_metric_frame(block_given? ? args : [])
begin
+ NewRelic::Agent.logger.debug("Tracing block execution with metrics: [#{frame_data.recorded_metrics.inspect}]")
NewRelic::Agent.trace_execution_scoped frame_data.recorded_metrics, :force => frame_data.force_flag do
frame_data.start_transaction
begin
View
4 lib/new_relic/agent/instrumentation/rails3/action_controller.rb
@@ -23,13 +23,16 @@ def newrelic_metric_path(action_name_override = nil)
end
def process_action(*args)
+ NewRelic::Agent.logger.debug("Calling instrumented Rails 3 process_action")
# skip instrumentation if we are in an ignored action
if _is_filtered?('do_not_trace')
+ NewRelic::Agent.logger.debug("Filtering based on do_not_trace flag")
NewRelic::Agent.disable_all_tracing do
return super
end
end
+ NewRelic::Agent.logger.debug("perform_action_with_newrelic_trace: name='#{self.action_name}', path='#{newrelic_metric_path}', class_name = '#{self.class.name}'")
perform_action_with_newrelic_trace(:category => :controller, :name => self.action_name, :path => newrelic_metric_path, :params => request.filtered_parameters, :class_name => self.class.name) do
super
end
@@ -84,6 +87,7 @@ def render_type(file_path)
executes do
class ActionController::Base
include NewRelic::Agent::Instrumentation::ControllerInstrumentation
+ NewRelic::Agent.logger.debug("Including Rails 3 ActionController instrumentation module")
include NewRelic::Agent::Instrumentation::Rails3::ActionController
end
end
View
1 lib/new_relic/agent/method_tracer.rb
@@ -235,6 +235,7 @@ def trace_execution_scoped(metric_names, options={})
set_if_nil(options, :metric)
set_if_nil(options, :deduct_call_time_from_parent)
first_name, metric_stats = get_metric_stats(metric_names, options)
+ NewRelic::Agent.logger.debug("trace_execution_scoped, first_name = #{first_name}")
start_time, expected_scope = trace_execution_scoped_header(first_name, options)
begin
yield

0 comments on commit 75c56b1

Please sign in to comment.