newrelic_rpm 2.10.8 → 2.11.0.beta
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of newrelic_rpm might be problematic. Click here for more details.
- data/CHANGELOG +15 -3
- data/lib/new_relic/agent.rb +17 -6
- data/lib/new_relic/agent/agent.rb +98 -77
- data/lib/new_relic/agent/busy_calculator.rb +1 -1
- data/lib/new_relic/agent/error_collector.rb +6 -3
- data/lib/new_relic/agent/instrumentation/active_record_instrumentation.rb +1 -0
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +0 -2
- data/lib/new_relic/agent/instrumentation/memcache.rb +0 -1
- data/lib/new_relic/agent/instrumentation/metric_frame.rb +8 -2
- data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +3 -3
- data/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb +10 -0
- data/lib/new_relic/agent/method_tracer.rb +1 -1
- data/lib/new_relic/agent/shim_agent.rb +1 -1
- data/lib/new_relic/agent/stats_engine.rb +1 -1
- data/lib/new_relic/agent/stats_engine/samplers.rb +2 -2
- data/lib/new_relic/control.rb +6 -3
- data/lib/new_relic/rack/metric_app.rb +4 -4
- data/lib/new_relic/version.rb +3 -3
- data/newrelic.yml +3 -3
- data/newrelic_rpm.gemspec +4 -192
- data/test/new_relic/agent/rpm_agent_test.rb +15 -2
- data/test/new_relic/agent/task_instrumentation_test.rb +3 -2
- metadata +12 -197
- data/rdoc/classes/NewRelic.html +0 -293
- data/rdoc/classes/NewRelic/Agent.html +0 -810
- data/rdoc/classes/NewRelic/Agent/Agent.html +0 -742
- data/rdoc/classes/NewRelic/Agent/BackgroundLoadingError.html +0 -111
- data/rdoc/classes/NewRelic/Agent/BusyCalculator.html +0 -309
- data/rdoc/classes/NewRelic/Agent/CollectionHelper.html +0 -196
- data/rdoc/classes/NewRelic/Agent/ErrorCollector.html +0 -378
- data/rdoc/classes/NewRelic/Agent/ForceDisconnectException.html +0 -118
- data/rdoc/classes/NewRelic/Agent/ForceRestartException.html +0 -117
- data/rdoc/classes/NewRelic/Agent/IgnoreSilentlyException.html +0 -118
- data/rdoc/classes/NewRelic/Agent/Instrumentation.html +0 -174
- data/rdoc/classes/NewRelic/Agent/Instrumentation/ActiveRecordInstrumentation.html +0 -221
- data/rdoc/classes/NewRelic/Agent/Instrumentation/ControllerInstrumentation.html +0 -349
- data/rdoc/classes/NewRelic/Agent/Instrumentation/ControllerInstrumentation/ClassMethods.html +0 -277
- data/rdoc/classes/NewRelic/Agent/Instrumentation/DelayedJobInstrumentation.html +0 -112
- data/rdoc/classes/NewRelic/Agent/Instrumentation/MetricFrame.html +0 -1007
- data/rdoc/classes/NewRelic/Agent/Instrumentation/Rack.html +0 -321
- data/rdoc/classes/NewRelic/Agent/Instrumentation/Sinatra.html +0 -176
- data/rdoc/classes/NewRelic/Agent/LicenseException.html +0 -117
- data/rdoc/classes/NewRelic/Agent/MethodTracer.html +0 -150
- data/rdoc/classes/NewRelic/Agent/MethodTracer/ClassMethods.html +0 -295
- data/rdoc/classes/NewRelic/Agent/MethodTracer/InstanceMethods.html +0 -284
- data/rdoc/classes/NewRelic/Agent/PostTooBigException.html +0 -120
- data/rdoc/classes/NewRelic/Agent/Sampler.html +0 -314
- data/rdoc/classes/NewRelic/Agent/Sampler/Unsupported.html +0 -117
- data/rdoc/classes/NewRelic/Agent/Samplers.html +0 -126
- data/rdoc/classes/NewRelic/Agent/Samplers/CpuSampler.html +0 -327
- data/rdoc/classes/NewRelic/Agent/Samplers/DelayedJobLockSampler.html +0 -296
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler.html +0 -321
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/Base.html +0 -186
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/JavaHeapSampler.html +0 -173
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/ProcStatus.html +0 -216
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/ShellPS.html +0 -207
- data/rdoc/classes/NewRelic/Agent/Samplers/ObjectSampler.html +0 -222
- data/rdoc/classes/NewRelic/Agent/ServerError.html +0 -117
- data/rdoc/classes/NewRelic/Agent/ShimAgent.html +0 -297
- data/rdoc/classes/NewRelic/Agent/StatsEngine.html +0 -204
- data/rdoc/classes/NewRelic/Agent/StatsEngine/MetricStats.html +0 -441
- data/rdoc/classes/NewRelic/Agent/StatsEngine/Samplers.html +0 -237
- data/rdoc/classes/NewRelic/Agent/StatsEngine/ScopeStackElement.html +0 -178
- data/rdoc/classes/NewRelic/Agent/StatsEngine/Transactions.html +0 -385
- data/rdoc/classes/NewRelic/Agent/TransactionSampleBuilder.html +0 -505
- data/rdoc/classes/NewRelic/Agent/TransactionSampler.html +0 -690
- data/rdoc/classes/NewRelic/Agent/WorkerLoop.html +0 -305
- data/rdoc/classes/NewRelic/Agent/WorkerLoop/LoopTask.html +0 -224
- data/rdoc/classes/NewRelic/ApdexStats.html +0 -196
- data/rdoc/classes/NewRelic/BasicStats.html +0 -113
- data/rdoc/classes/NewRelic/ChainedCall.html +0 -180
- data/rdoc/classes/NewRelic/Commands.html +0 -112
- data/rdoc/classes/NewRelic/Commands/CommandFailure.html +0 -167
- data/rdoc/classes/NewRelic/Commands/Deployments.html +0 -285
- data/rdoc/classes/NewRelic/Control.html +0 -1760
- data/rdoc/classes/NewRelic/Control/External.html +0 -148
- data/rdoc/classes/NewRelic/Control/Merb.html +0 -227
- data/rdoc/classes/NewRelic/Control/Rails.html +0 -542
- data/rdoc/classes/NewRelic/Control/Ruby.html +0 -266
- data/rdoc/classes/NewRelic/Control/Sinatra.html +0 -178
- data/rdoc/classes/NewRelic/DelayedJobInjection.html +0 -118
- data/rdoc/classes/NewRelic/Histogram.html +0 -226
- data/rdoc/classes/NewRelic/Histogram/Bucket.html +0 -319
- data/rdoc/classes/NewRelic/Histogram/Shim.html +0 -144
- data/rdoc/classes/NewRelic/LocalEnvironment.html +0 -572
- data/rdoc/classes/NewRelic/MerbBootLoader.html +0 -146
- data/rdoc/classes/NewRelic/MethodTraceStats.html +0 -250
- data/rdoc/classes/NewRelic/MetricData.html +0 -347
- data/rdoc/classes/NewRelic/MetricParser.html +0 -747
- data/rdoc/classes/NewRelic/MetricParser/ActionMailer.html +0 -170
- data/rdoc/classes/NewRelic/MetricParser/ActiveMerchant.html +0 -267
- data/rdoc/classes/NewRelic/MetricParser/ActiveRecord.html +0 -250
- data/rdoc/classes/NewRelic/MetricParser/Controller.html +0 -363
- data/rdoc/classes/NewRelic/MetricParser/ControllerCPU.html +0 -319
- data/rdoc/classes/NewRelic/MetricParser/Errors.html +0 -170
- data/rdoc/classes/NewRelic/MetricParser/External.html +0 -339
- data/rdoc/classes/NewRelic/MetricParser/MemCache.html +0 -340
- data/rdoc/classes/NewRelic/MetricParser/OtherTransaction.html +0 -205
- data/rdoc/classes/NewRelic/MetricParser/View.html +0 -381
- data/rdoc/classes/NewRelic/MetricParser/WebFrontend.html +0 -182
- data/rdoc/classes/NewRelic/MetricParser/WebService.html +0 -172
- data/rdoc/classes/NewRelic/MetricSpec.html +0 -406
- data/rdoc/classes/NewRelic/Metrics.html +0 -138
- data/rdoc/classes/NewRelic/NoticedError.html +0 -200
- data/rdoc/classes/NewRelic/Rack.html +0 -112
- data/rdoc/classes/NewRelic/Rack/MetricApp.html +0 -193
- data/rdoc/classes/NewRelic/Rack/Status.html +0 -165
- data/rdoc/classes/NewRelic/ScopedMethodTraceStats.html +0 -225
- data/rdoc/classes/NewRelic/Stats.html +0 -917
- data/rdoc/classes/NewRelic/StatsBase.html +0 -346
- data/rdoc/classes/NewRelic/TransactionAnalysis.html +0 -269
- data/rdoc/classes/NewRelic/TransactionAnalysis/SegmentSummary.html +0 -338
- data/rdoc/classes/NewRelic/TransactionSample.html +0 -766
- data/rdoc/classes/NewRelic/TransactionSample/CompositeSegment.html +0 -195
- data/rdoc/classes/NewRelic/TransactionSample/FakeSegment.html +0 -113
- data/rdoc/classes/NewRelic/TransactionSample/IDGenerator.html +0 -178
- data/rdoc/classes/NewRelic/TransactionSample/Segment.html +0 -920
- data/rdoc/classes/NewRelic/TransactionSample/SummarySegment.html +0 -180
- data/rdoc/classes/NewRelic/VersionNumber.html +0 -338
- data/rdoc/classes/NewRelicApi.html +0 -270
- data/rdoc/classes/NewRelicApi/Account.html +0 -178
- data/rdoc/classes/NewRelicApi/Account/AccountUsage.html +0 -111
- data/rdoc/classes/NewRelicApi/Account/AccountView.html +0 -146
- data/rdoc/classes/NewRelicApi/Application.html +0 -139
- data/rdoc/classes/NewRelicApi/Application/Agent.html +0 -119
- data/rdoc/classes/NewRelicApi/Deployment.html +0 -123
- data/rdoc/classes/NewRelicApi/Subscription.html +0 -111
- data/rdoc/classes/NewRelicApi/ThresholdValue.html +0 -174
- data/rdoc/classes/NewRelicApi/User.html +0 -111
- data/rdoc/created.rid +0 -1
- data/rdoc/files/CHANGELOG.html +0 -649
- data/rdoc/files/LICENSE.html +0 -143
- data/rdoc/files/lib/new_relic/agent/agent_rb.html +0 -113
- data/rdoc/files/lib/new_relic/agent/busy_calculator_rb.html +0 -115
- data/rdoc/files/lib/new_relic/agent/chained_call_rb.html +0 -107
- data/rdoc/files/lib/new_relic/agent/collection_helper_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/error_collector_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/instrumentation/active_merchant_rb.html +0 -107
- data/rdoc/files/lib/new_relic/agent/instrumentation/active_record_instrumentation_rb.html +0 -108
- data/rdoc/files/lib/new_relic/agent/instrumentation/authlogic_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/instrumentation/controller_instrumentation_rb.html +0 -108
- data/rdoc/files/lib/new_relic/agent/instrumentation/data_mapper_rb.html +0 -191
- data/rdoc/files/lib/new_relic/agent/instrumentation/delayed_job_instrumentation_rb.html +0 -109
- data/rdoc/files/lib/new_relic/agent/instrumentation/memcache_rb.html +0 -152
- data/rdoc/files/lib/new_relic/agent/instrumentation/merb/controller_rb.html +0 -155
- data/rdoc/files/lib/new_relic/agent/instrumentation/merb/errors_rb.html +0 -107
- data/rdoc/files/lib/new_relic/agent/instrumentation/metric_frame_rb.html +0 -113
- data/rdoc/files/lib/new_relic/agent/instrumentation/net_rb.html +0 -172
- data/rdoc/files/lib/new_relic/agent/instrumentation/passenger_instrumentation_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/instrumentation/rack_rb.html +0 -108
- data/rdoc/files/lib/new_relic/agent/instrumentation/rails/action_controller_rb.html +0 -152
- data/rdoc/files/lib/new_relic/agent/instrumentation/rails/action_web_service_rb.html +0 -108
- data/rdoc/files/lib/new_relic/agent/instrumentation/rails/errors_rb.html +0 -167
- data/rdoc/files/lib/new_relic/agent/instrumentation/sinatra_rb.html +0 -108
- data/rdoc/files/lib/new_relic/agent/method_tracer_rb.html +0 -108
- data/rdoc/files/lib/new_relic/agent/sampler_rb.html +0 -116
- data/rdoc/files/lib/new_relic/agent/samplers/cpu_sampler_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/samplers/delayed_job_lock_sampler_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/samplers/memory_sampler_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/samplers/object_sampler_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/shim_agent_rb.html +0 -108
- data/rdoc/files/lib/new_relic/agent/stats_engine/metric_stats_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/stats_engine/samplers_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/stats_engine/transactions_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/stats_engine_rb.html +0 -110
- data/rdoc/files/lib/new_relic/agent/transaction_sampler_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent/worker_loop_rb.html +0 -101
- data/rdoc/files/lib/new_relic/agent_rb.html +0 -204
- data/rdoc/files/lib/new_relic/commands/deployments_rb.html +0 -119
- data/rdoc/files/lib/new_relic/commands/new_relic_commands_rb.html +0 -108
- data/rdoc/files/lib/new_relic/control/external_rb.html +0 -117
- data/rdoc/files/lib/new_relic/control/merb_rb.html +0 -101
- data/rdoc/files/lib/new_relic/control/rails_rb.html +0 -108
- data/rdoc/files/lib/new_relic/control/ruby_rb.html +0 -110
- data/rdoc/files/lib/new_relic/control/sinatra_rb.html +0 -108
- data/rdoc/files/lib/new_relic/control_rb.html +0 -116
- data/rdoc/files/lib/new_relic/delayed_job_injection_rb.html +0 -180
- data/rdoc/files/lib/new_relic/histogram_rb.html +0 -114
- data/rdoc/files/lib/new_relic/local_environment_rb.html +0 -111
- data/rdoc/files/lib/new_relic/merbtasks_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_data_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/action_mailer_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/active_merchant_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/active_record_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/controller_cpu_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/controller_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/errors_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/external_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/mem_cache_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/other_transaction_rb.html +0 -108
- data/rdoc/files/lib/new_relic/metric_parser/view_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser/web_frontend_rb.html +0 -107
- data/rdoc/files/lib/new_relic/metric_parser/web_service_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_parser_rb.html +0 -101
- data/rdoc/files/lib/new_relic/metric_spec_rb.html +0 -108
- data/rdoc/files/lib/new_relic/metrics_rb.html +0 -101
- data/rdoc/files/lib/new_relic/noticed_error_rb.html +0 -107
- data/rdoc/files/lib/new_relic/rack/metric_app_rb.html +0 -108
- data/rdoc/files/lib/new_relic/rack_app_rb.html +0 -110
- data/rdoc/files/lib/new_relic/recipes_rb.html +0 -128
- data/rdoc/files/lib/new_relic/stats_rb.html +0 -101
- data/rdoc/files/lib/new_relic/transaction_analysis_rb.html +0 -108
- data/rdoc/files/lib/new_relic/transaction_sample_rb.html +0 -101
- data/rdoc/files/lib/new_relic/version_rb.html +0 -101
- data/rdoc/files/lib/new_relic_api_rb.html +0 -145
- data/rdoc/files/lib/newrelic_rpm_rb.html +0 -147
- data/rdoc/files/lib/tasks/all_rb.html +0 -107
- data/rdoc/fr_class_index.html +0 -134
- data/rdoc/fr_file_index.html +0 -103
- data/rdoc/fr_method_index.html +0 -568
- data/rdoc/index.html +0 -24
- data/rdoc/rdoc-style.css +0 -208
@@ -1,810 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: NewRelic::Agent</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">NewRelic::Agent</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/new_relic/agent/agent_rb.html">
|
59
|
-
lib/new_relic/agent/agent.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../../files/lib/new_relic/agent/busy_calculator_rb.html">
|
63
|
-
lib/new_relic/agent/busy_calculator.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
<a href="../../files/lib/new_relic/agent/collection_helper_rb.html">
|
67
|
-
lib/new_relic/agent/collection_helper.rb
|
68
|
-
</a>
|
69
|
-
<br />
|
70
|
-
<a href="../../files/lib/new_relic/agent/error_collector_rb.html">
|
71
|
-
lib/new_relic/agent/error_collector.rb
|
72
|
-
</a>
|
73
|
-
<br />
|
74
|
-
<a href="../../files/lib/new_relic/agent/instrumentation/active_record_instrumentation_rb.html">
|
75
|
-
lib/new_relic/agent/instrumentation/active_record_instrumentation.rb
|
76
|
-
</a>
|
77
|
-
<br />
|
78
|
-
<a href="../../files/lib/new_relic/agent/instrumentation/controller_instrumentation_rb.html">
|
79
|
-
lib/new_relic/agent/instrumentation/controller_instrumentation.rb
|
80
|
-
</a>
|
81
|
-
<br />
|
82
|
-
<a href="../../files/lib/new_relic/agent/instrumentation/delayed_job_instrumentation_rb.html">
|
83
|
-
lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb
|
84
|
-
</a>
|
85
|
-
<br />
|
86
|
-
<a href="../../files/lib/new_relic/agent/instrumentation/rack_rb.html">
|
87
|
-
lib/new_relic/agent/instrumentation/rack.rb
|
88
|
-
</a>
|
89
|
-
<br />
|
90
|
-
<a href="../../files/lib/new_relic/agent/instrumentation/sinatra_rb.html">
|
91
|
-
lib/new_relic/agent/instrumentation/sinatra.rb
|
92
|
-
</a>
|
93
|
-
<br />
|
94
|
-
<a href="../../files/lib/new_relic/agent/method_tracer_rb.html">
|
95
|
-
lib/new_relic/agent/method_tracer.rb
|
96
|
-
</a>
|
97
|
-
<br />
|
98
|
-
<a href="../../files/lib/new_relic/agent/samplers/cpu_sampler_rb.html">
|
99
|
-
lib/new_relic/agent/samplers/cpu_sampler.rb
|
100
|
-
</a>
|
101
|
-
<br />
|
102
|
-
<a href="../../files/lib/new_relic/agent/samplers/delayed_job_lock_sampler_rb.html">
|
103
|
-
lib/new_relic/agent/samplers/delayed_job_lock_sampler.rb
|
104
|
-
</a>
|
105
|
-
<br />
|
106
|
-
<a href="../../files/lib/new_relic/agent/samplers/memory_sampler_rb.html">
|
107
|
-
lib/new_relic/agent/samplers/memory_sampler.rb
|
108
|
-
</a>
|
109
|
-
<br />
|
110
|
-
<a href="../../files/lib/new_relic/agent/samplers/object_sampler_rb.html">
|
111
|
-
lib/new_relic/agent/samplers/object_sampler.rb
|
112
|
-
</a>
|
113
|
-
<br />
|
114
|
-
<a href="../../files/lib/new_relic/agent/stats_engine/metric_stats_rb.html">
|
115
|
-
lib/new_relic/agent/stats_engine/metric_stats.rb
|
116
|
-
</a>
|
117
|
-
<br />
|
118
|
-
<a href="../../files/lib/new_relic/agent/stats_engine/samplers_rb.html">
|
119
|
-
lib/new_relic/agent/stats_engine/samplers.rb
|
120
|
-
</a>
|
121
|
-
<br />
|
122
|
-
<a href="../../files/lib/new_relic/agent/stats_engine/transactions_rb.html">
|
123
|
-
lib/new_relic/agent/stats_engine/transactions.rb
|
124
|
-
</a>
|
125
|
-
<br />
|
126
|
-
<a href="../../files/lib/new_relic/agent/stats_engine_rb.html">
|
127
|
-
lib/new_relic/agent/stats_engine.rb
|
128
|
-
</a>
|
129
|
-
<br />
|
130
|
-
<a href="../../files/lib/new_relic/agent/transaction_sampler_rb.html">
|
131
|
-
lib/new_relic/agent/transaction_sampler.rb
|
132
|
-
</a>
|
133
|
-
<br />
|
134
|
-
<a href="../../files/lib/new_relic/agent/worker_loop_rb.html">
|
135
|
-
lib/new_relic/agent/worker_loop.rb
|
136
|
-
</a>
|
137
|
-
<br />
|
138
|
-
<a href="../../files/lib/new_relic/agent_rb.html">
|
139
|
-
lib/new_relic/agent.rb
|
140
|
-
</a>
|
141
|
-
<br />
|
142
|
-
</td>
|
143
|
-
</tr>
|
144
|
-
|
145
|
-
</table>
|
146
|
-
</div>
|
147
|
-
<!-- banner header -->
|
148
|
-
|
149
|
-
<div id="bodyContent">
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
<div id="contextContent">
|
154
|
-
|
155
|
-
<div id="description">
|
156
|
-
<h2><a href="Agent.html">Agent</a> APIs</h2>
|
157
|
-
<p>
|
158
|
-
This module contains the public API methods for the <a
|
159
|
-
href="Agent.html">Agent</a>.
|
160
|
-
</p>
|
161
|
-
<p>
|
162
|
-
For adding custom instrumentation to method invocations, refer to the docs
|
163
|
-
in the class <a
|
164
|
-
href="Agent/MethodTracer.html">NewRelic::Agent::MethodTracer</a>.
|
165
|
-
</p>
|
166
|
-
<p>
|
167
|
-
For information on how to customize the controller instrumentation, or to
|
168
|
-
instrument something other than Rails so that high level dispatcher actions
|
169
|
-
or background tasks show up as first class operations in RPM, refer to <a
|
170
|
-
href="Agent/Instrumentation/ControllerInstrumentation.html">NewRelic::Agent::Instrumentation::ControllerInstrumentation</a>
|
171
|
-
and <a
|
172
|
-
href="Agent/Instrumentation/ControllerInstrumentation/ClassMethods.html">NewRelic::Agent::Instrumentation::ControllerInstrumentation::ClassMethods</a>.
|
173
|
-
</p>
|
174
|
-
<p>
|
175
|
-
Methods in this module as well as documented methods in <a
|
176
|
-
href="Agent/MethodTracer.html">NewRelic::Agent::MethodTracer</a> and <a
|
177
|
-
href="Agent/Instrumentation/ControllerInstrumentation.html">NewRelic::Agent::Instrumentation::ControllerInstrumentation</a>
|
178
|
-
are available to applications. When the agent is not enabled the method
|
179
|
-
implementations are stubbed into no-ops to reduce overhead.
|
180
|
-
</p>
|
181
|
-
<p>
|
182
|
-
Methods and classes in other parts of the agent are not guaranteed to be
|
183
|
-
available between releases.
|
184
|
-
</p>
|
185
|
-
<p>
|
186
|
-
Refer to the online docs at support.newrelic.com to see how to access the
|
187
|
-
data collected by custom instrumentation, or e-mail support at New Relic
|
188
|
-
for help.
|
189
|
-
</p>
|
190
|
-
|
191
|
-
</div>
|
192
|
-
|
193
|
-
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<div id="method-list">
|
197
|
-
<h3 class="section-bar">Methods</h3>
|
198
|
-
|
199
|
-
<div class="name-list">
|
200
|
-
<a href="#M000116">abort_transaction!</a>
|
201
|
-
<a href="#M000121">add_custom_parameters</a>
|
202
|
-
<a href="#M000112">add_instrumentation</a>
|
203
|
-
<a href="#M000122">add_request_parameters</a>
|
204
|
-
<a href="#M000117">disable_all_tracing</a>
|
205
|
-
<a href="#M000114">disable_sql_recording</a>
|
206
|
-
<a href="#M000115">disable_transaction_tracing</a>
|
207
|
-
<a href="#M000108">get_stats</a>
|
208
|
-
<a href="#M000109">get_stats_no_scope</a>
|
209
|
-
<a href="#M000119">ignore_error_filter</a>
|
210
|
-
<a href="#M000118">is_execution_traced?</a>
|
211
|
-
<a href="#M000110">manual_start</a>
|
212
|
-
<a href="#M000120">notice_error</a>
|
213
|
-
<a href="#M000113">set_sql_obfuscator</a>
|
214
|
-
<a href="#M000111">shutdown</a>
|
215
|
-
<a href="#M000123">with_database_metric_name</a>
|
216
|
-
</div>
|
217
|
-
</div>
|
218
|
-
|
219
|
-
</div>
|
220
|
-
|
221
|
-
|
222
|
-
<!-- if includes -->
|
223
|
-
|
224
|
-
<div id="section">
|
225
|
-
|
226
|
-
<div id="class-list">
|
227
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
228
|
-
|
229
|
-
Module <a href="Agent/BusyCalculator.html" class="link">NewRelic::Agent::BusyCalculator</a><br />
|
230
|
-
Module <a href="Agent/CollectionHelper.html" class="link">NewRelic::Agent::CollectionHelper</a><br />
|
231
|
-
Module <a href="Agent/Instrumentation.html" class="link">NewRelic::Agent::Instrumentation</a><br />
|
232
|
-
Module <a href="Agent/MethodTracer.html" class="link">NewRelic::Agent::MethodTracer</a><br />
|
233
|
-
Module <a href="Agent/Samplers.html" class="link">NewRelic::Agent::Samplers</a><br />
|
234
|
-
Class <a href="Agent/Agent.html" class="link">NewRelic::Agent::Agent</a><br />
|
235
|
-
Class <a href="Agent/BackgroundLoadingError.html" class="link">NewRelic::Agent::BackgroundLoadingError</a><br />
|
236
|
-
Class <a href="Agent/ErrorCollector.html" class="link">NewRelic::Agent::ErrorCollector</a><br />
|
237
|
-
Class <a href="Agent/ForceDisconnectException.html" class="link">NewRelic::Agent::ForceDisconnectException</a><br />
|
238
|
-
Class <a href="Agent/ForceRestartException.html" class="link">NewRelic::Agent::ForceRestartException</a><br />
|
239
|
-
Class <a href="Agent/IgnoreSilentlyException.html" class="link">NewRelic::Agent::IgnoreSilentlyException</a><br />
|
240
|
-
Class <a href="Agent/LicenseException.html" class="link">NewRelic::Agent::LicenseException</a><br />
|
241
|
-
Class <a href="Agent/PostTooBigException.html" class="link">NewRelic::Agent::PostTooBigException</a><br />
|
242
|
-
Class <a href="Agent/Sampler.html" class="link">NewRelic::Agent::Sampler</a><br />
|
243
|
-
Class <a href="Agent/ServerError.html" class="link">NewRelic::Agent::ServerError</a><br />
|
244
|
-
Class <a href="Agent/ShimAgent.html" class="link">NewRelic::Agent::ShimAgent</a><br />
|
245
|
-
Class <a href="Agent/StatsEngine.html" class="link">NewRelic::Agent::StatsEngine</a><br />
|
246
|
-
Class <a href="Agent/TransactionSampleBuilder.html" class="link">NewRelic::Agent::TransactionSampleBuilder</a><br />
|
247
|
-
Class <a href="Agent/TransactionSampler.html" class="link">NewRelic::Agent::TransactionSampler</a><br />
|
248
|
-
Class <a href="Agent/WorkerLoop.html" class="link">NewRelic::Agent::WorkerLoop</a><br />
|
249
|
-
|
250
|
-
</div>
|
251
|
-
|
252
|
-
|
253
|
-
<div id="aliases-list">
|
254
|
-
<h3 class="section-bar">External Aliases</h3>
|
255
|
-
|
256
|
-
<div class="name-list">
|
257
|
-
<table summary="aliases">
|
258
|
-
<tr class="top-aligned-row context-row">
|
259
|
-
<td class="context-item-name">agent</td>
|
260
|
-
<td>-></td>
|
261
|
-
<td class="context-item-value">instance</td>
|
262
|
-
</tr>
|
263
|
-
</table>
|
264
|
-
</div>
|
265
|
-
</div>
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
<!-- if method_list -->
|
272
|
-
<div id="methods">
|
273
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
274
|
-
|
275
|
-
<div id="method-M000116" class="method-detail">
|
276
|
-
<a name="M000116"></a>
|
277
|
-
|
278
|
-
<div class="method-heading">
|
279
|
-
<a href="#M000116" class="method-signature">
|
280
|
-
<span class="method-name">abort_transaction!</span><span class="method-args">()</span>
|
281
|
-
</a>
|
282
|
-
</div>
|
283
|
-
|
284
|
-
<div class="method-description">
|
285
|
-
<p>
|
286
|
-
Cancel the collection of the current transaction in progress, if any. Only
|
287
|
-
affects the transaction started on this thread once it has started and
|
288
|
-
before it has completed.
|
289
|
-
</p>
|
290
|
-
<p><a class="source-toggle" href="#"
|
291
|
-
onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
|
292
|
-
<div class="method-source-code" id="M000116-source">
|
293
|
-
<pre>
|
294
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 251</span>
|
295
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abort_transaction!</span>
|
296
|
-
<span class="ruby-comment cmt"># The class may not be loaded if the agent is disabled</span>
|
297
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span><span class="ruby-operator">::</span><span class="ruby-constant">Instrumentation</span><span class="ruby-operator">::</span><span class="ruby-constant">MetricFrame</span>
|
298
|
-
<span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span><span class="ruby-operator">::</span><span class="ruby-constant">Instrumentation</span><span class="ruby-operator">::</span><span class="ruby-constant">MetricFrame</span>.<span class="ruby-identifier">abort_transaction!</span>
|
299
|
-
<span class="ruby-keyword kw">end</span>
|
300
|
-
<span class="ruby-keyword kw">end</span>
|
301
|
-
</pre>
|
302
|
-
</div>
|
303
|
-
</div>
|
304
|
-
</div>
|
305
|
-
|
306
|
-
<div id="method-M000121" class="method-detail">
|
307
|
-
<a name="M000121"></a>
|
308
|
-
|
309
|
-
<div class="method-heading">
|
310
|
-
<a href="#M000121" class="method-signature">
|
311
|
-
<span class="method-name">add_custom_parameters</span><span class="method-args">(params)</span>
|
312
|
-
</a>
|
313
|
-
</div>
|
314
|
-
|
315
|
-
<div class="method-description">
|
316
|
-
<p>
|
317
|
-
Add parameters to the current transaction trace on the call stack.
|
318
|
-
</p>
|
319
|
-
<p><a class="source-toggle" href="#"
|
320
|
-
onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
|
321
|
-
<div class="method-source-code" id="M000121-source">
|
322
|
-
<pre>
|
323
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 305</span>
|
324
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_custom_parameters</span>(<span class="ruby-identifier">params</span>)
|
325
|
-
<span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span><span class="ruby-operator">::</span><span class="ruby-constant">Instrumentation</span><span class="ruby-operator">::</span><span class="ruby-constant">MetricFrame</span>.<span class="ruby-identifier">add_custom_parameters</span>(<span class="ruby-identifier">params</span>)
|
326
|
-
<span class="ruby-keyword kw">end</span>
|
327
|
-
</pre>
|
328
|
-
</div>
|
329
|
-
</div>
|
330
|
-
</div>
|
331
|
-
|
332
|
-
<div id="method-M000112" class="method-detail">
|
333
|
-
<a name="M000112"></a>
|
334
|
-
|
335
|
-
<div class="method-heading">
|
336
|
-
<a href="#M000112" class="method-signature">
|
337
|
-
<span class="method-name">add_instrumentation</span><span class="method-args">(file_pattern)</span>
|
338
|
-
</a>
|
339
|
-
</div>
|
340
|
-
|
341
|
-
<div class="method-description">
|
342
|
-
<p>
|
343
|
-
Add instrumentation files to the agent. The argument should be a glob
|
344
|
-
matching ruby scripts which will be executed at the time instrumentation is
|
345
|
-
loaded. Since instrumentation is not loaded when the agent is not running
|
346
|
-
it‘s better to use this method to register instrumentation than just
|
347
|
-
loading the files directly, although that probably also works.
|
348
|
-
</p>
|
349
|
-
<p><a class="source-toggle" href="#"
|
350
|
-
onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
|
351
|
-
<div class="method-source-code" id="M000112-source">
|
352
|
-
<pre>
|
353
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 197</span>
|
354
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_instrumentation</span> <span class="ruby-identifier">file_pattern</span>
|
355
|
-
<span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Control</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">add_instrumentation</span> <span class="ruby-identifier">file_pattern</span>
|
356
|
-
<span class="ruby-keyword kw">end</span>
|
357
|
-
</pre>
|
358
|
-
</div>
|
359
|
-
</div>
|
360
|
-
</div>
|
361
|
-
|
362
|
-
<div id="method-M000122" class="method-detail">
|
363
|
-
<a name="M000122"></a>
|
364
|
-
|
365
|
-
<div class="method-heading">
|
366
|
-
<span class="method-name">add_request_parameters</span><span class="method-args">(params)</span>
|
367
|
-
</div>
|
368
|
-
|
369
|
-
<div class="method-description">
|
370
|
-
<p>
|
371
|
-
Alias for <a href="Agent.html#M000121">add_custom_parameters</a>
|
372
|
-
</p>
|
373
|
-
</div>
|
374
|
-
</div>
|
375
|
-
|
376
|
-
<div id="method-M000117" class="method-detail">
|
377
|
-
<a name="M000117"></a>
|
378
|
-
|
379
|
-
<div class="method-heading">
|
380
|
-
<a href="#M000117" class="method-signature">
|
381
|
-
<span class="method-name">disable_all_tracing</span><span class="method-args">() {|| ...}</span>
|
382
|
-
</a>
|
383
|
-
</div>
|
384
|
-
|
385
|
-
<div class="method-description">
|
386
|
-
<p>
|
387
|
-
Yield to the block without collecting any metrics or traces in any of the
|
388
|
-
subsequent calls. If executed recursively, will keep track of the first
|
389
|
-
entry point and turn on tracing again after leaving that block. This uses
|
390
|
-
the thread local <tt>newrelic_untrace</tt>
|
391
|
-
</p>
|
392
|
-
<p><a class="source-toggle" href="#"
|
393
|
-
onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
|
394
|
-
<div class="method-source-code" id="M000117-source">
|
395
|
-
<pre>
|
396
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 262</span>
|
397
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disable_all_tracing</span>
|
398
|
-
<span class="ruby-identifier">agent</span>.<span class="ruby-identifier">push_trace_execution_flag</span>(<span class="ruby-keyword kw">false</span>)
|
399
|
-
<span class="ruby-keyword kw">yield</span>
|
400
|
-
<span class="ruby-keyword kw">ensure</span>
|
401
|
-
<span class="ruby-identifier">agent</span>.<span class="ruby-identifier">pop_trace_execution_flag</span>
|
402
|
-
<span class="ruby-keyword kw">end</span>
|
403
|
-
</pre>
|
404
|
-
</div>
|
405
|
-
</div>
|
406
|
-
</div>
|
407
|
-
|
408
|
-
<div id="method-M000114" class="method-detail">
|
409
|
-
<a name="M000114"></a>
|
410
|
-
|
411
|
-
<div class="method-heading">
|
412
|
-
<a href="#M000114" class="method-signature">
|
413
|
-
<span class="method-name">disable_sql_recording</span><span class="method-args">() {|| ...}</span>
|
414
|
-
</a>
|
415
|
-
</div>
|
416
|
-
|
417
|
-
<div class="method-description">
|
418
|
-
<p>
|
419
|
-
This method sets the state of sql recording in the transaction sampler
|
420
|
-
feature. Within the given block, no sql will be recorded
|
421
|
-
</p>
|
422
|
-
<p>
|
423
|
-
usage:
|
424
|
-
</p>
|
425
|
-
<pre>
|
426
|
-
NewRelic::Agent.disable_sql_recording do
|
427
|
-
...
|
428
|
-
end
|
429
|
-
</pre>
|
430
|
-
<p><a class="source-toggle" href="#"
|
431
|
-
onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
|
432
|
-
<div class="method-source-code" id="M000114-source">
|
433
|
-
<pre>
|
434
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 228</span>
|
435
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disable_sql_recording</span>
|
436
|
-
<span class="ruby-identifier">state</span> = <span class="ruby-identifier">agent</span>.<span class="ruby-identifier">set_record_sql</span>(<span class="ruby-keyword kw">false</span>)
|
437
|
-
<span class="ruby-keyword kw">begin</span>
|
438
|
-
<span class="ruby-keyword kw">yield</span>
|
439
|
-
<span class="ruby-keyword kw">ensure</span>
|
440
|
-
<span class="ruby-identifier">agent</span>.<span class="ruby-identifier">set_record_sql</span>(<span class="ruby-identifier">state</span>)
|
441
|
-
<span class="ruby-keyword kw">end</span>
|
442
|
-
<span class="ruby-keyword kw">end</span>
|
443
|
-
</pre>
|
444
|
-
</div>
|
445
|
-
</div>
|
446
|
-
</div>
|
447
|
-
|
448
|
-
<div id="method-M000115" class="method-detail">
|
449
|
-
<a name="M000115"></a>
|
450
|
-
|
451
|
-
<div class="method-heading">
|
452
|
-
<a href="#M000115" class="method-signature">
|
453
|
-
<span class="method-name">disable_transaction_tracing</span><span class="method-args">() {|| ...}</span>
|
454
|
-
</a>
|
455
|
-
</div>
|
456
|
-
|
457
|
-
<div class="method-description">
|
458
|
-
<p>
|
459
|
-
This method disables the recording of transaction traces in the given
|
460
|
-
block. See also <a href="Agent.html#M000117">disable_all_tracing</a>
|
461
|
-
</p>
|
462
|
-
<p><a class="source-toggle" href="#"
|
463
|
-
onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
|
464
|
-
<div class="method-source-code" id="M000115-source">
|
465
|
-
<pre>
|
466
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 239</span>
|
467
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disable_transaction_tracing</span>
|
468
|
-
<span class="ruby-identifier">state</span> = <span class="ruby-identifier">agent</span>.<span class="ruby-identifier">set_record_tt</span>(<span class="ruby-keyword kw">false</span>)
|
469
|
-
<span class="ruby-keyword kw">begin</span>
|
470
|
-
<span class="ruby-keyword kw">yield</span>
|
471
|
-
<span class="ruby-keyword kw">ensure</span>
|
472
|
-
<span class="ruby-identifier">agent</span>.<span class="ruby-identifier">set_record_tt</span>(<span class="ruby-identifier">state</span>)
|
473
|
-
<span class="ruby-keyword kw">end</span>
|
474
|
-
<span class="ruby-keyword kw">end</span>
|
475
|
-
</pre>
|
476
|
-
</div>
|
477
|
-
</div>
|
478
|
-
</div>
|
479
|
-
|
480
|
-
<div id="method-M000108" class="method-detail">
|
481
|
-
<a name="M000108"></a>
|
482
|
-
|
483
|
-
<div class="method-heading">
|
484
|
-
<a href="#M000108" class="method-signature">
|
485
|
-
<span class="method-name">get_stats</span><span class="method-args">(metric_name, use_scope=false)</span>
|
486
|
-
</a>
|
487
|
-
</div>
|
488
|
-
|
489
|
-
<div class="method-description">
|
490
|
-
<p>
|
491
|
-
Get or create a statistics gatherer that will aggregate numerical data
|
492
|
-
under a metric name.
|
493
|
-
</p>
|
494
|
-
<p>
|
495
|
-
<tt>metric_name</tt> should follow a slash separated path convention.
|
496
|
-
Application specific metrics should begin with "Custom/".
|
497
|
-
</p>
|
498
|
-
<p>
|
499
|
-
Return a <a href="Stats.html">NewRelic::Stats</a> that accepts data via
|
500
|
-
calls to add_data_point(value).
|
501
|
-
</p>
|
502
|
-
<p><a class="source-toggle" href="#"
|
503
|
-
onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
|
504
|
-
<div class="method-source-code" id="M000108-source">
|
505
|
-
<pre>
|
506
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 159</span>
|
507
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_stats</span>(<span class="ruby-identifier">metric_name</span>, <span class="ruby-identifier">use_scope</span>=<span class="ruby-keyword kw">false</span>)
|
508
|
-
<span class="ruby-ivar">@agent</span>.<span class="ruby-identifier">stats_engine</span>.<span class="ruby-identifier">get_stats</span>(<span class="ruby-identifier">metric_name</span>, <span class="ruby-identifier">use_scope</span>)
|
509
|
-
<span class="ruby-keyword kw">end</span>
|
510
|
-
</pre>
|
511
|
-
</div>
|
512
|
-
</div>
|
513
|
-
</div>
|
514
|
-
|
515
|
-
<div id="method-M000109" class="method-detail">
|
516
|
-
<a name="M000109"></a>
|
517
|
-
|
518
|
-
<div class="method-heading">
|
519
|
-
<span class="method-name">get_stats_no_scope</span><span class="method-args">(metric_name, use_scope=false)</span>
|
520
|
-
</div>
|
521
|
-
|
522
|
-
<div class="method-description">
|
523
|
-
<p>
|
524
|
-
Alias for <a href="Agent.html#M000108">get_stats</a>
|
525
|
-
</p>
|
526
|
-
</div>
|
527
|
-
</div>
|
528
|
-
|
529
|
-
<div id="method-M000119" class="method-detail">
|
530
|
-
<a name="M000119"></a>
|
531
|
-
|
532
|
-
<div class="method-heading">
|
533
|
-
<a href="#M000119" class="method-signature">
|
534
|
-
<span class="method-name">ignore_error_filter</span><span class="method-args">(&block)</span>
|
535
|
-
</a>
|
536
|
-
</div>
|
537
|
-
|
538
|
-
<div class="method-description">
|
539
|
-
<p>
|
540
|
-
Set a filter to be applied to errors that RPM will track. The block should
|
541
|
-
evalute to the exception to track (which could be different from the
|
542
|
-
original exception) or nil to ignore this exception.
|
543
|
-
</p>
|
544
|
-
<p>
|
545
|
-
The block is yielded to with the exception to filter.
|
546
|
-
</p>
|
547
|
-
<p>
|
548
|
-
Do not call return.
|
549
|
-
</p>
|
550
|
-
<p><a class="source-toggle" href="#"
|
551
|
-
onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
|
552
|
-
<div class="method-source-code" id="M000119-source">
|
553
|
-
<pre>
|
554
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 282</span>
|
555
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ignore_error_filter</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
556
|
-
<span class="ruby-identifier">agent</span>.<span class="ruby-identifier">error_collector</span>.<span class="ruby-identifier">ignore_error_filter</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
557
|
-
<span class="ruby-keyword kw">end</span>
|
558
|
-
</pre>
|
559
|
-
</div>
|
560
|
-
</div>
|
561
|
-
</div>
|
562
|
-
|
563
|
-
<div id="method-M000118" class="method-detail">
|
564
|
-
<a name="M000118"></a>
|
565
|
-
|
566
|
-
<div class="method-heading">
|
567
|
-
<a href="#M000118" class="method-signature">
|
568
|
-
<span class="method-name">is_execution_traced?</span><span class="method-args">()</span>
|
569
|
-
</a>
|
570
|
-
</div>
|
571
|
-
|
572
|
-
<div class="method-description">
|
573
|
-
<p>
|
574
|
-
Check to see if we are capturing metrics currently on this thread.
|
575
|
-
</p>
|
576
|
-
<p><a class="source-toggle" href="#"
|
577
|
-
onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
|
578
|
-
<div class="method-source-code" id="M000118-source">
|
579
|
-
<pre>
|
580
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 270</span>
|
581
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_execution_traced?</span>
|
582
|
-
<span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:newrelic_untraced</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:newrelic_untraced</span>].<span class="ruby-identifier">last</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">false</span>
|
583
|
-
<span class="ruby-keyword kw">end</span>
|
584
|
-
</pre>
|
585
|
-
</div>
|
586
|
-
</div>
|
587
|
-
</div>
|
588
|
-
|
589
|
-
<div id="method-M000110" class="method-detail">
|
590
|
-
<a name="M000110"></a>
|
591
|
-
|
592
|
-
<div class="method-heading">
|
593
|
-
<a href="#M000110" class="method-signature">
|
594
|
-
<span class="method-name">manual_start</span><span class="method-args">(options={})</span>
|
595
|
-
</a>
|
596
|
-
</div>
|
597
|
-
|
598
|
-
<div class="method-description">
|
599
|
-
<p>
|
600
|
-
Call this to manually start the <a href="Agent.html">Agent</a> in
|
601
|
-
situations where the <a href="Agent.html">Agent</a> does not auto-start.
|
602
|
-
</p>
|
603
|
-
<p>
|
604
|
-
When the app environment loads, so does the <a href="Agent.html">Agent</a>.
|
605
|
-
However, the <a href="Agent.html">Agent</a> will only connect to RPM if a
|
606
|
-
web front-end is found. If you want to selectively monitor ruby processes
|
607
|
-
that don‘t use web plugins, then call this method in your code and
|
608
|
-
the <a href="Agent.html">Agent</a> will fire up and start reporting to RPM.
|
609
|
-
</p>
|
610
|
-
<p>
|
611
|
-
Options are passed in as overrides for values in the newrelic.yml, such as
|
612
|
-
app_name. In addition, the option <tt>log</tt> will take a logger that will
|
613
|
-
be used instead of the standard file logger. The setting for the
|
614
|
-
newrelic.yml section to use (ie, RAILS_ENV) can be overridden with an :env
|
615
|
-
argument.
|
616
|
-
</p>
|
617
|
-
<p><a class="source-toggle" href="#"
|
618
|
-
onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
|
619
|
-
<div class="method-source-code" id="M000110-source">
|
620
|
-
<pre>
|
621
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 179</span>
|
622
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">manual_start</span>(<span class="ruby-identifier">options</span>={})
|
623
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Hash</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">options</span>
|
624
|
-
<span class="ruby-comment cmt"># Ignore all args but hash options</span>
|
625
|
-
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">:agent_enabled</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>
|
626
|
-
<span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Control</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">init_plugin</span> <span class="ruby-identifier">options</span>
|
627
|
-
<span class="ruby-keyword kw">end</span>
|
628
|
-
</pre>
|
629
|
-
</div>
|
630
|
-
</div>
|
631
|
-
</div>
|
632
|
-
|
633
|
-
<div id="method-M000120" class="method-detail">
|
634
|
-
<a name="M000120"></a>
|
635
|
-
|
636
|
-
<div class="method-heading">
|
637
|
-
<a href="#M000120" class="method-signature">
|
638
|
-
<span class="method-name">notice_error</span><span class="method-args">(exception, options={})</span>
|
639
|
-
</a>
|
640
|
-
</div>
|
641
|
-
|
642
|
-
<div class="method-description">
|
643
|
-
<p>
|
644
|
-
Record the given error in RPM. It will be passed through the <a
|
645
|
-
href="Agent.html#M000119">ignore_error_filter</a> if there is one.
|
646
|
-
</p>
|
647
|
-
<ul>
|
648
|
-
<li><tt>exception</tt> is the exception which will be recorded
|
649
|
-
|
650
|
-
</li>
|
651
|
-
</ul>
|
652
|
-
<p>
|
653
|
-
Options:
|
654
|
-
</p>
|
655
|
-
<ul>
|
656
|
-
<li><tt>:uri</tt> => The request path, minus any request params or query
|
657
|
-
string.
|
658
|
-
|
659
|
-
</li>
|
660
|
-
<li><tt>:referer</tt> => The URI of the referer
|
661
|
-
|
662
|
-
</li>
|
663
|
-
<li><tt>:metric</tt> => The metric name associated with the transaction
|
664
|
-
|
665
|
-
</li>
|
666
|
-
<li><tt>:request_params</tt> => Request parameters, already filtered if
|
667
|
-
necessary
|
668
|
-
|
669
|
-
</li>
|
670
|
-
<li><tt>:custom_params</tt> => Custom parameters
|
671
|
-
|
672
|
-
</li>
|
673
|
-
</ul>
|
674
|
-
<p>
|
675
|
-
Anything left over is treated as custom params
|
676
|
-
</p>
|
677
|
-
<p><a class="source-toggle" href="#"
|
678
|
-
onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
|
679
|
-
<div class="method-source-code" id="M000120-source">
|
680
|
-
<pre>
|
681
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 299</span>
|
682
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">notice_error</span>(<span class="ruby-identifier">exception</span>, <span class="ruby-identifier">options</span>={})
|
683
|
-
<span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span><span class="ruby-operator">::</span><span class="ruby-constant">Instrumentation</span><span class="ruby-operator">::</span><span class="ruby-constant">MetricFrame</span>.<span class="ruby-identifier">notice_error</span>(<span class="ruby-identifier">exception</span>, <span class="ruby-identifier">options</span>)
|
684
|
-
<span class="ruby-keyword kw">end</span>
|
685
|
-
</pre>
|
686
|
-
</div>
|
687
|
-
</div>
|
688
|
-
</div>
|
689
|
-
|
690
|
-
<div id="method-M000113" class="method-detail">
|
691
|
-
<a name="M000113"></a>
|
692
|
-
|
693
|
-
<div class="method-heading">
|
694
|
-
<a href="#M000113" class="method-signature">
|
695
|
-
<span class="method-name">set_sql_obfuscator</span><span class="method-args">(type = :replace, &block)</span>
|
696
|
-
</a>
|
697
|
-
</div>
|
698
|
-
|
699
|
-
<div class="method-description">
|
700
|
-
<p>
|
701
|
-
This method sets the block sent to this method as a sql obfuscator. The
|
702
|
-
block will be called with a single String SQL statement to obfuscate. The
|
703
|
-
method must return the obfuscated String SQL. If chaining of obfuscators is
|
704
|
-
required, use type = :before or :after
|
705
|
-
</p>
|
706
|
-
<p>
|
707
|
-
type = :before, :replace, :after
|
708
|
-
</p>
|
709
|
-
<p>
|
710
|
-
Example:
|
711
|
-
</p>
|
712
|
-
<pre>
|
713
|
-
NewRelic::Agent.set_sql_obfuscator(:replace) do |sql|
|
714
|
-
my_obfuscator(sql)
|
715
|
-
end
|
716
|
-
</pre>
|
717
|
-
<p><a class="source-toggle" href="#"
|
718
|
-
onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
|
719
|
-
<div class="method-source-code" id="M000113-source">
|
720
|
-
<pre>
|
721
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 214</span>
|
722
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_sql_obfuscator</span>(<span class="ruby-identifier">type</span> = <span class="ruby-identifier">:replace</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
723
|
-
<span class="ruby-identifier">agent</span>.<span class="ruby-identifier">set_sql_obfuscator</span> <span class="ruby-identifier">type</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
724
|
-
<span class="ruby-keyword kw">end</span>
|
725
|
-
</pre>
|
726
|
-
</div>
|
727
|
-
</div>
|
728
|
-
</div>
|
729
|
-
|
730
|
-
<div id="method-M000111" class="method-detail">
|
731
|
-
<a name="M000111"></a>
|
732
|
-
|
733
|
-
<div class="method-heading">
|
734
|
-
<a href="#M000111" class="method-signature">
|
735
|
-
<span class="method-name">shutdown</span><span class="method-args">()</span>
|
736
|
-
</a>
|
737
|
-
</div>
|
738
|
-
|
739
|
-
<div class="method-description">
|
740
|
-
<p>
|
741
|
-
Shutdown the agent. Call this before exiting. Sends any queued data and
|
742
|
-
kills the background thread.
|
743
|
-
</p>
|
744
|
-
<p><a class="source-toggle" href="#"
|
745
|
-
onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
|
746
|
-
<div class="method-source-code" id="M000111-source">
|
747
|
-
<pre>
|
748
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 188</span>
|
749
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shutdown</span>
|
750
|
-
<span class="ruby-ivar">@agent</span>.<span class="ruby-identifier">shutdown</span>
|
751
|
-
<span class="ruby-keyword kw">end</span>
|
752
|
-
</pre>
|
753
|
-
</div>
|
754
|
-
</div>
|
755
|
-
</div>
|
756
|
-
|
757
|
-
<div id="method-M000123" class="method-detail">
|
758
|
-
<a name="M000123"></a>
|
759
|
-
|
760
|
-
<div class="method-heading">
|
761
|
-
<a href="#M000123" class="method-signature">
|
762
|
-
<span class="method-name">with_database_metric_name</span><span class="method-args">(model, method) {|| ...}</span>
|
763
|
-
</a>
|
764
|
-
</div>
|
765
|
-
|
766
|
-
<div class="method-description">
|
767
|
-
<p>
|
768
|
-
Yield to a block that is run with a database metric name context. This
|
769
|
-
means the Database instrumentation will use this for the metric name if it
|
770
|
-
does not otherwise know about a model. This is re-entrant.
|
771
|
-
</p>
|
772
|
-
<ul>
|
773
|
-
<li><tt>model</tt> is the DB model class
|
774
|
-
|
775
|
-
</li>
|
776
|
-
<li><tt>method</tt> is the name of the finder method or other method to
|
777
|
-
identify the operation with.
|
778
|
-
|
779
|
-
</li>
|
780
|
-
</ul>
|
781
|
-
<p><a class="source-toggle" href="#"
|
782
|
-
onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
|
783
|
-
<div class="method-source-code" id="M000123-source">
|
784
|
-
<pre>
|
785
|
-
<span class="ruby-comment cmt"># File lib/new_relic/agent.rb, line 320</span>
|
786
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_database_metric_name</span>(<span class="ruby-identifier">model</span>, <span class="ruby-identifier">method</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
787
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">frame</span> = <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span><span class="ruby-operator">::</span><span class="ruby-constant">Instrumentation</span><span class="ruby-operator">::</span><span class="ruby-constant">MetricFrame</span>.<span class="ruby-identifier">current</span>
|
788
|
-
<span class="ruby-identifier">frame</span>.<span class="ruby-identifier">with_database_metric_name</span>(<span class="ruby-identifier">model</span>, <span class="ruby-identifier">method</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
789
|
-
<span class="ruby-keyword kw">else</span>
|
790
|
-
<span class="ruby-keyword kw">yield</span>
|
791
|
-
<span class="ruby-keyword kw">end</span>
|
792
|
-
<span class="ruby-keyword kw">end</span>
|
793
|
-
</pre>
|
794
|
-
</div>
|
795
|
-
</div>
|
796
|
-
</div>
|
797
|
-
|
798
|
-
|
799
|
-
</div>
|
800
|
-
|
801
|
-
|
802
|
-
</div>
|
803
|
-
|
804
|
-
|
805
|
-
<div id="validator-badges">
|
806
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
807
|
-
</div>
|
808
|
-
|
809
|
-
</body>
|
810
|
-
</html>
|