newrelic_rpm 2.10.6 → 2.10.8
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 +14 -0
- data/lib/new_relic/agent.rb +5 -4
- data/lib/new_relic/agent/agent.rb +81 -101
- data/lib/new_relic/agent/error_collector.rb +1 -2
- data/lib/new_relic/agent/instrumentation/authlogic.rb +2 -2
- data/lib/new_relic/agent/instrumentation/merb/controller.rb +2 -2
- data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +45 -0
- data/lib/new_relic/agent/instrumentation/rails3/errors.rb +21 -0
- data/lib/new_relic/agent/method_tracer.rb +2 -2
- data/lib/new_relic/agent/samplers/delayed_job_lock_sampler.rb +1 -1
- data/lib/new_relic/agent/stats_engine/samplers.rb +1 -2
- data/lib/new_relic/agent/transaction_sampler.rb +1 -1
- data/lib/new_relic/agent/worker_loop.rb +47 -86
- data/lib/new_relic/{agent/collection_helper.rb → collection_helper.rb} +2 -4
- data/lib/new_relic/control.rb +18 -2
- data/lib/new_relic/control/rails3.rb +75 -0
- data/lib/new_relic/local_environment.rb +11 -3
- data/lib/new_relic/noticed_error.rb +2 -1
- data/lib/new_relic/version.rb +10 -9
- data/newrelic_rpm.gemspec +195 -3
- data/rdoc/classes/NewRelic.html +293 -0
- data/rdoc/classes/NewRelic/Agent.html +810 -0
- data/rdoc/classes/NewRelic/Agent/Agent.html +742 -0
- data/rdoc/classes/NewRelic/Agent/BackgroundLoadingError.html +111 -0
- data/rdoc/classes/NewRelic/Agent/BusyCalculator.html +309 -0
- data/rdoc/classes/NewRelic/Agent/CollectionHelper.html +196 -0
- data/rdoc/classes/NewRelic/Agent/ErrorCollector.html +378 -0
- data/rdoc/classes/NewRelic/Agent/ForceDisconnectException.html +118 -0
- data/rdoc/classes/NewRelic/Agent/ForceRestartException.html +117 -0
- data/rdoc/classes/NewRelic/Agent/IgnoreSilentlyException.html +118 -0
- data/rdoc/classes/NewRelic/Agent/Instrumentation.html +174 -0
- data/rdoc/classes/NewRelic/Agent/Instrumentation/ActiveRecordInstrumentation.html +221 -0
- data/rdoc/classes/NewRelic/Agent/Instrumentation/ControllerInstrumentation.html +349 -0
- data/rdoc/classes/NewRelic/Agent/Instrumentation/ControllerInstrumentation/ClassMethods.html +277 -0
- data/rdoc/classes/NewRelic/Agent/Instrumentation/DelayedJobInstrumentation.html +112 -0
- data/rdoc/classes/NewRelic/Agent/Instrumentation/MetricFrame.html +1007 -0
- data/rdoc/classes/NewRelic/Agent/Instrumentation/Rack.html +321 -0
- data/rdoc/classes/NewRelic/Agent/Instrumentation/Sinatra.html +176 -0
- data/rdoc/classes/NewRelic/Agent/LicenseException.html +117 -0
- data/rdoc/classes/NewRelic/Agent/MethodTracer.html +150 -0
- data/rdoc/classes/NewRelic/Agent/MethodTracer/ClassMethods.html +295 -0
- data/rdoc/classes/NewRelic/Agent/MethodTracer/InstanceMethods.html +284 -0
- data/rdoc/classes/NewRelic/Agent/PostTooBigException.html +120 -0
- data/rdoc/classes/NewRelic/Agent/Sampler.html +314 -0
- data/rdoc/classes/NewRelic/Agent/Sampler/Unsupported.html +117 -0
- data/rdoc/classes/NewRelic/Agent/Samplers.html +126 -0
- data/rdoc/classes/NewRelic/Agent/Samplers/CpuSampler.html +327 -0
- data/rdoc/classes/NewRelic/Agent/Samplers/DelayedJobLockSampler.html +296 -0
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler.html +321 -0
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/Base.html +186 -0
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/JavaHeapSampler.html +173 -0
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/ProcStatus.html +216 -0
- data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/ShellPS.html +207 -0
- data/rdoc/classes/NewRelic/Agent/Samplers/ObjectSampler.html +222 -0
- data/rdoc/classes/NewRelic/Agent/ServerError.html +117 -0
- data/rdoc/classes/NewRelic/Agent/ShimAgent.html +297 -0
- data/rdoc/classes/NewRelic/Agent/StatsEngine.html +204 -0
- data/rdoc/classes/NewRelic/Agent/StatsEngine/MetricStats.html +441 -0
- data/rdoc/classes/NewRelic/Agent/StatsEngine/Samplers.html +237 -0
- data/rdoc/classes/NewRelic/Agent/StatsEngine/ScopeStackElement.html +178 -0
- data/rdoc/classes/NewRelic/Agent/StatsEngine/Transactions.html +385 -0
- data/rdoc/classes/NewRelic/Agent/TransactionSampleBuilder.html +505 -0
- data/rdoc/classes/NewRelic/Agent/TransactionSampler.html +690 -0
- data/rdoc/classes/NewRelic/Agent/WorkerLoop.html +305 -0
- data/rdoc/classes/NewRelic/Agent/WorkerLoop/LoopTask.html +224 -0
- data/rdoc/classes/NewRelic/ApdexStats.html +196 -0
- data/rdoc/classes/NewRelic/BasicStats.html +113 -0
- data/rdoc/classes/NewRelic/ChainedCall.html +180 -0
- data/rdoc/classes/NewRelic/Commands.html +112 -0
- data/rdoc/classes/NewRelic/Commands/CommandFailure.html +167 -0
- data/rdoc/classes/NewRelic/Commands/Deployments.html +285 -0
- data/rdoc/classes/NewRelic/Control.html +1760 -0
- data/rdoc/classes/NewRelic/Control/External.html +148 -0
- data/rdoc/classes/NewRelic/Control/Merb.html +227 -0
- data/rdoc/classes/NewRelic/Control/Rails.html +542 -0
- data/rdoc/classes/NewRelic/Control/Ruby.html +266 -0
- data/rdoc/classes/NewRelic/Control/Sinatra.html +178 -0
- data/rdoc/classes/NewRelic/DelayedJobInjection.html +118 -0
- data/rdoc/classes/NewRelic/Histogram.html +226 -0
- data/rdoc/classes/NewRelic/Histogram/Bucket.html +319 -0
- data/rdoc/classes/NewRelic/Histogram/Shim.html +144 -0
- data/rdoc/classes/NewRelic/LocalEnvironment.html +572 -0
- data/rdoc/classes/NewRelic/MerbBootLoader.html +146 -0
- data/rdoc/classes/NewRelic/MethodTraceStats.html +250 -0
- data/rdoc/classes/NewRelic/MetricData.html +347 -0
- data/rdoc/classes/NewRelic/MetricParser.html +747 -0
- data/rdoc/classes/NewRelic/MetricParser/ActionMailer.html +170 -0
- data/rdoc/classes/NewRelic/MetricParser/ActiveMerchant.html +267 -0
- data/rdoc/classes/NewRelic/MetricParser/ActiveRecord.html +250 -0
- data/rdoc/classes/NewRelic/MetricParser/Controller.html +363 -0
- data/rdoc/classes/NewRelic/MetricParser/ControllerCPU.html +319 -0
- data/rdoc/classes/NewRelic/MetricParser/Errors.html +170 -0
- data/rdoc/classes/NewRelic/MetricParser/External.html +339 -0
- data/rdoc/classes/NewRelic/MetricParser/MemCache.html +340 -0
- data/rdoc/classes/NewRelic/MetricParser/OtherTransaction.html +205 -0
- data/rdoc/classes/NewRelic/MetricParser/View.html +381 -0
- data/rdoc/classes/NewRelic/MetricParser/WebFrontend.html +182 -0
- data/rdoc/classes/NewRelic/MetricParser/WebService.html +172 -0
- data/rdoc/classes/NewRelic/MetricSpec.html +406 -0
- data/rdoc/classes/NewRelic/Metrics.html +138 -0
- data/rdoc/classes/NewRelic/NoticedError.html +200 -0
- data/rdoc/classes/NewRelic/Rack.html +112 -0
- data/rdoc/classes/NewRelic/Rack/MetricApp.html +193 -0
- data/rdoc/classes/NewRelic/Rack/Status.html +165 -0
- data/rdoc/classes/NewRelic/ScopedMethodTraceStats.html +225 -0
- data/rdoc/classes/NewRelic/Stats.html +917 -0
- data/rdoc/classes/NewRelic/StatsBase.html +346 -0
- data/rdoc/classes/NewRelic/TransactionAnalysis.html +269 -0
- data/rdoc/classes/NewRelic/TransactionAnalysis/SegmentSummary.html +338 -0
- data/rdoc/classes/NewRelic/TransactionSample.html +766 -0
- data/rdoc/classes/NewRelic/TransactionSample/CompositeSegment.html +195 -0
- data/rdoc/classes/NewRelic/TransactionSample/FakeSegment.html +113 -0
- data/rdoc/classes/NewRelic/TransactionSample/IDGenerator.html +178 -0
- data/rdoc/classes/NewRelic/TransactionSample/Segment.html +920 -0
- data/rdoc/classes/NewRelic/TransactionSample/SummarySegment.html +180 -0
- data/rdoc/classes/NewRelic/VersionNumber.html +338 -0
- data/rdoc/classes/NewRelicApi.html +270 -0
- data/rdoc/classes/NewRelicApi/Account.html +178 -0
- data/rdoc/classes/NewRelicApi/Account/AccountUsage.html +111 -0
- data/rdoc/classes/NewRelicApi/Account/AccountView.html +146 -0
- data/rdoc/classes/NewRelicApi/Application.html +139 -0
- data/rdoc/classes/NewRelicApi/Application/Agent.html +119 -0
- data/rdoc/classes/NewRelicApi/Deployment.html +123 -0
- data/rdoc/classes/NewRelicApi/Subscription.html +111 -0
- data/rdoc/classes/NewRelicApi/ThresholdValue.html +174 -0
- data/rdoc/classes/NewRelicApi/User.html +111 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/CHANGELOG.html +649 -0
- data/rdoc/files/LICENSE.html +143 -0
- data/rdoc/files/lib/new_relic/agent/agent_rb.html +113 -0
- data/rdoc/files/lib/new_relic/agent/busy_calculator_rb.html +115 -0
- data/rdoc/files/lib/new_relic/agent/chained_call_rb.html +107 -0
- data/rdoc/files/lib/new_relic/agent/collection_helper_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/error_collector_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/active_merchant_rb.html +107 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/active_record_instrumentation_rb.html +108 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/authlogic_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/controller_instrumentation_rb.html +108 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/data_mapper_rb.html +191 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/delayed_job_instrumentation_rb.html +109 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/memcache_rb.html +152 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/merb/controller_rb.html +155 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/merb/errors_rb.html +107 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/metric_frame_rb.html +113 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/net_rb.html +172 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/passenger_instrumentation_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/rack_rb.html +108 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/rails/action_controller_rb.html +152 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/rails/action_web_service_rb.html +108 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/rails/errors_rb.html +167 -0
- data/rdoc/files/lib/new_relic/agent/instrumentation/sinatra_rb.html +108 -0
- data/rdoc/files/lib/new_relic/agent/method_tracer_rb.html +108 -0
- data/rdoc/files/lib/new_relic/agent/sampler_rb.html +116 -0
- data/rdoc/files/lib/new_relic/agent/samplers/cpu_sampler_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/samplers/delayed_job_lock_sampler_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/samplers/memory_sampler_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/samplers/object_sampler_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/shim_agent_rb.html +108 -0
- data/rdoc/files/lib/new_relic/agent/stats_engine/metric_stats_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/stats_engine/samplers_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/stats_engine/transactions_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/stats_engine_rb.html +110 -0
- data/rdoc/files/lib/new_relic/agent/transaction_sampler_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent/worker_loop_rb.html +101 -0
- data/rdoc/files/lib/new_relic/agent_rb.html +204 -0
- data/rdoc/files/lib/new_relic/commands/deployments_rb.html +119 -0
- data/rdoc/files/lib/new_relic/commands/new_relic_commands_rb.html +108 -0
- data/rdoc/files/lib/new_relic/control/external_rb.html +117 -0
- data/rdoc/files/lib/new_relic/control/merb_rb.html +101 -0
- data/rdoc/files/lib/new_relic/control/rails_rb.html +108 -0
- data/rdoc/files/lib/new_relic/control/ruby_rb.html +110 -0
- data/rdoc/files/lib/new_relic/control/sinatra_rb.html +108 -0
- data/rdoc/files/lib/new_relic/control_rb.html +116 -0
- data/rdoc/files/lib/new_relic/delayed_job_injection_rb.html +180 -0
- data/rdoc/files/lib/new_relic/histogram_rb.html +114 -0
- data/rdoc/files/lib/new_relic/local_environment_rb.html +111 -0
- data/rdoc/files/lib/new_relic/merbtasks_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_data_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/action_mailer_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/active_merchant_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/active_record_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/controller_cpu_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/controller_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/errors_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/external_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/mem_cache_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/other_transaction_rb.html +108 -0
- data/rdoc/files/lib/new_relic/metric_parser/view_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser/web_frontend_rb.html +107 -0
- data/rdoc/files/lib/new_relic/metric_parser/web_service_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_parser_rb.html +101 -0
- data/rdoc/files/lib/new_relic/metric_spec_rb.html +108 -0
- data/rdoc/files/lib/new_relic/metrics_rb.html +101 -0
- data/rdoc/files/lib/new_relic/noticed_error_rb.html +107 -0
- data/rdoc/files/lib/new_relic/rack/metric_app_rb.html +108 -0
- data/rdoc/files/lib/new_relic/rack_app_rb.html +110 -0
- data/rdoc/files/lib/new_relic/recipes_rb.html +128 -0
- data/rdoc/files/lib/new_relic/stats_rb.html +101 -0
- data/rdoc/files/lib/new_relic/transaction_analysis_rb.html +108 -0
- data/rdoc/files/lib/new_relic/transaction_sample_rb.html +101 -0
- data/rdoc/files/lib/new_relic/version_rb.html +101 -0
- data/rdoc/files/lib/new_relic_api_rb.html +145 -0
- data/rdoc/files/lib/newrelic_rpm_rb.html +147 -0
- data/rdoc/files/lib/tasks/all_rb.html +107 -0
- data/rdoc/fr_class_index.html +134 -0
- data/rdoc/fr_file_index.html +103 -0
- data/rdoc/fr_method_index.html +568 -0
- data/rdoc/index.html +24 -0
- data/rdoc/rdoc-style.css +208 -0
- data/test/new_relic/agent/active_record_instrumentation_test.rb +16 -5
- data/test/new_relic/agent/collection_helper_test.rb +1 -1
- data/test/new_relic/agent/error_collector_test.rb +2 -4
- data/test/new_relic/agent/rpm_agent_test.rb +1 -1
- data/test/new_relic/agent/task_instrumentation_test.rb +1 -1
- data/test/new_relic/agent/worker_loop_test.rb +33 -76
- data/test/new_relic/control_test.rb +9 -2
- data/test/new_relic/stats_test.rb +29 -1
- data/test/new_relic/version_number_test.rb +13 -0
- data/ui/helpers/newrelic_helper.rb +1 -2
- metadata +196 -4
@@ -0,0 +1,108 @@
|
|
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>File: controller_instrumentation.rb</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="fileHeader">
|
50
|
+
<h1>controller_instrumentation.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/new_relic/agent/instrumentation/controller_instrumentation.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed Mar 03 09:26:57 -0800 2010</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
<div id="requires-list">
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
74
|
+
|
75
|
+
<div class="name-list">
|
76
|
+
new_relic/agent/instrumentation/metric_frame
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
<!-- if includes -->
|
87
|
+
|
88
|
+
<div id="section">
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<!-- if method_list -->
|
98
|
+
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
<div id="validator-badges">
|
104
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
</body>
|
108
|
+
</html>
|
@@ -0,0 +1,191 @@
|
|
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>File: data_mapper.rb</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="fileHeader">
|
50
|
+
<h1>data_mapper.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/new_relic/agent/instrumentation/data_mapper.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed Mar 03 09:26:20 -0800 2010</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<p>
|
73
|
+
<a href="../../../../../classes/NewRelic.html">NewRelic</a> instrumentation
|
74
|
+
for DataMapper For now, we have to refer to all db metrics as
|
75
|
+
"ActiveRecord"
|
76
|
+
</p>
|
77
|
+
|
78
|
+
</div>
|
79
|
+
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
<div id="method-list">
|
84
|
+
<h3 class="section-bar">Methods</h3>
|
85
|
+
|
86
|
+
<div class="name-list">
|
87
|
+
<a href="#M000002">log_with_capture_sql</a>
|
88
|
+
<a href="#M000001">log_with_newrelic_instrumentation</a>
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
</div>
|
93
|
+
|
94
|
+
|
95
|
+
<!-- if includes -->
|
96
|
+
|
97
|
+
<div id="section">
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<!-- if method_list -->
|
107
|
+
<div id="methods">
|
108
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
109
|
+
|
110
|
+
<div id="method-M000002" class="method-detail">
|
111
|
+
<a name="M000002"></a>
|
112
|
+
|
113
|
+
<div class="method-heading">
|
114
|
+
<a href="#M000002" class="method-signature">
|
115
|
+
<span class="method-name">log_with_capture_sql</span><span class="method-args">(sql, name, &block)</span>
|
116
|
+
</a>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<div class="method-description">
|
120
|
+
<p><a class="source-toggle" href="#"
|
121
|
+
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
122
|
+
<div class="method-source-code" id="M000002-source">
|
123
|
+
<pre>
|
124
|
+
<span class="ruby-comment cmt"># File lib/new_relic/agent/instrumentation/data_mapper.rb, line 47</span>
|
125
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_with_capture_sql</span>(<span class="ruby-identifier">sql</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
126
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@@my_sql_defined</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">ConnectionAdapters</span><span class="ruby-operator">::</span><span class="ruby-constant">MysqlAdapter</span>)
|
127
|
+
<span class="ruby-identifier">config</span> = <span class="ruby-ivar">@config</span>
|
128
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@@postgres_defined</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">ConnectionAdapters</span><span class="ruby-operator">::</span><span class="ruby-constant">PostgreSQLAdapter</span>)
|
129
|
+
<span class="ruby-identifier">config</span> = <span class="ruby-ivar">@config</span>
|
130
|
+
<span class="ruby-keyword kw">else</span>
|
131
|
+
<span class="ruby-identifier">config</span> = <span class="ruby-keyword kw">nil</span>
|
132
|
+
<span class="ruby-keyword kw">end</span>
|
133
|
+
|
134
|
+
<span class="ruby-identifier">t0</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
135
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">log_without_newrelic_instrumentation</span>(<span class="ruby-identifier">sql</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
136
|
+
|
137
|
+
<span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">transaction_sampler</span>.<span class="ruby-identifier">notice_sql</span>(<span class="ruby-identifier">sql</span>, <span class="ruby-identifier">config</span>, <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">t0</span>)
|
138
|
+
|
139
|
+
<span class="ruby-identifier">result</span>
|
140
|
+
<span class="ruby-keyword kw">end</span>
|
141
|
+
</pre>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
<div id="method-M000001" class="method-detail">
|
147
|
+
<a name="M000001"></a>
|
148
|
+
|
149
|
+
<div class="method-heading">
|
150
|
+
<a href="#M000001" class="method-signature">
|
151
|
+
<span class="method-name">log_with_newrelic_instrumentation</span><span class="method-args">(sql, name, &block)</span>
|
152
|
+
</a>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
<div class="method-description">
|
156
|
+
<p><a class="source-toggle" href="#"
|
157
|
+
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
158
|
+
<div class="method-source-code" id="M000001-source">
|
159
|
+
<pre>
|
160
|
+
<span class="ruby-comment cmt"># File lib/new_relic/agent/instrumentation/data_mapper.rb, line 33</span>
|
161
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_with_newrelic_instrumentation</span>(<span class="ruby-identifier">sql</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
162
|
+
<span class="ruby-comment cmt"># if we aren't in a blamed context, then add one so that we can see that</span>
|
163
|
+
<span class="ruby-comment cmt"># controllers are calling SQL directly</span>
|
164
|
+
<span class="ruby-comment cmt"># we check scope_depth vs 2 since the controller is 1, and the </span>
|
165
|
+
<span class="ruby-comment cmt"># </span>
|
166
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">transaction_sampler</span>.<span class="ruby-identifier">scope_depth</span> <span class="ruby-operator"><</span> <span class="ruby-value">2</span>
|
167
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">trace_method_execution</span> <span class="ruby-value str">"Database/DirectSQL"</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">do</span>
|
168
|
+
<span class="ruby-identifier">log_with_capture_sql</span>(<span class="ruby-identifier">sql</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
169
|
+
<span class="ruby-keyword kw">end</span>
|
170
|
+
<span class="ruby-keyword kw">else</span>
|
171
|
+
<span class="ruby-identifier">log_with_capture_sql</span>(<span class="ruby-identifier">sql</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
172
|
+
<span class="ruby-keyword kw">end</span>
|
173
|
+
<span class="ruby-keyword kw">end</span>
|
174
|
+
</pre>
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
|
180
|
+
</div>
|
181
|
+
|
182
|
+
|
183
|
+
</div>
|
184
|
+
|
185
|
+
|
186
|
+
<div id="validator-badges">
|
187
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
</body>
|
191
|
+
</html>
|
@@ -0,0 +1,109 @@
|
|
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>File: delayed_job_instrumentation.rb</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="fileHeader">
|
50
|
+
<h1>delayed_job_instrumentation.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed Mar 03 09:26:57 -0800 2010</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
<div id="requires-list">
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
74
|
+
|
75
|
+
<div class="name-list">
|
76
|
+
new_relic/agent/instrumentation/controller_instrumentation
|
77
|
+
java
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
<!-- if includes -->
|
88
|
+
|
89
|
+
<div id="section">
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if method_list -->
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<div id="validator-badges">
|
105
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
</body>
|
109
|
+
</html>
|
@@ -0,0 +1,152 @@
|
|
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>File: memcache.rb</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="fileHeader">
|
50
|
+
<h1>memcache.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/new_relic/agent/instrumentation/memcache.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Fri Mar 05 15:00:59 -0800 2010</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<p>
|
73
|
+
NOTE there are multiple implementations of the MemCache client in Ruby,
|
74
|
+
each with slightly different API‘s and semantics. See:
|
75
|
+
</p>
|
76
|
+
<pre>
|
77
|
+
http://www.deveiate.org/code/Ruby-MemCache/ (Gem: Ruby-MemCache)
|
78
|
+
http://seattlerb.rubyforge.org/memcache-client/ (Gem: memcache-client)
|
79
|
+
</pre>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
<div id="method-list">
|
87
|
+
<h3 class="section-bar">Methods</h3>
|
88
|
+
|
89
|
+
<div class="name-list">
|
90
|
+
<a href="#M000003">instrument_method</a>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
|
97
|
+
<!-- if includes -->
|
98
|
+
|
99
|
+
<div id="section">
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<!-- if method_list -->
|
109
|
+
<div id="methods">
|
110
|
+
<h3 class="section-bar">Public Class methods</h3>
|
111
|
+
|
112
|
+
<div id="method-M000003" class="method-detail">
|
113
|
+
<a name="M000003"></a>
|
114
|
+
|
115
|
+
<div class="method-heading">
|
116
|
+
<a href="#M000003" class="method-signature">
|
117
|
+
<span class="method-name">instrument_method</span><span class="method-args">(the_class, method_name)</span>
|
118
|
+
</a>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<div class="method-description">
|
122
|
+
<p>
|
123
|
+
This is in the memcache-client implementation and has never existed in
|
124
|
+
Ruby-MemCache
|
125
|
+
</p>
|
126
|
+
<p><a class="source-toggle" href="#"
|
127
|
+
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
128
|
+
<div class="method-source-code" id="M000003-source">
|
129
|
+
<pre>
|
130
|
+
<span class="ruby-comment cmt"># File lib/new_relic/agent/instrumentation/memcache.rb, line 9</span>
|
131
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instrument_method</span>(<span class="ruby-identifier">the_class</span>, <span class="ruby-identifier">method_name</span>)
|
132
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">the_class</span>.<span class="ruby-identifier">method_defined?</span> <span class="ruby-identifier">method_name</span>.<span class="ruby-identifier">to_sym</span>
|
133
|
+
<span class="ruby-identifier">the_class</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-value str">"def \#{method_name}_with_newrelic_trace(*args)\nmetrics = [\"MemCache/\#{method_name}\",\n(NewRelic::Agent::Instrumentation::MetricFrame.recording_web_transaction? ? 'MemCache/allWeb' : 'MemCache/allOther')]\nself.class.trace_execution_scoped(metrics) do\n\#{method_name}_without_newrelic_trace(*args)\nend\nend\nalias \#{method_name}_without_newrelic_trace \#{method_name}\nalias \#{method_name} \#{method_name}_with_newrelic_trace\n"</span>
|
134
|
+
<span class="ruby-keyword kw">end</span>
|
135
|
+
</pre>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
</div>
|
142
|
+
|
143
|
+
|
144
|
+
</div>
|
145
|
+
|
146
|
+
|
147
|
+
<div id="validator-badges">
|
148
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
</body>
|
152
|
+
</html>
|