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.

Files changed (220) hide show
  1. data/CHANGELOG +14 -0
  2. data/lib/new_relic/agent.rb +5 -4
  3. data/lib/new_relic/agent/agent.rb +81 -101
  4. data/lib/new_relic/agent/error_collector.rb +1 -2
  5. data/lib/new_relic/agent/instrumentation/authlogic.rb +2 -2
  6. data/lib/new_relic/agent/instrumentation/merb/controller.rb +2 -2
  7. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +45 -0
  8. data/lib/new_relic/agent/instrumentation/rails3/errors.rb +21 -0
  9. data/lib/new_relic/agent/method_tracer.rb +2 -2
  10. data/lib/new_relic/agent/samplers/delayed_job_lock_sampler.rb +1 -1
  11. data/lib/new_relic/agent/stats_engine/samplers.rb +1 -2
  12. data/lib/new_relic/agent/transaction_sampler.rb +1 -1
  13. data/lib/new_relic/agent/worker_loop.rb +47 -86
  14. data/lib/new_relic/{agent/collection_helper.rb → collection_helper.rb} +2 -4
  15. data/lib/new_relic/control.rb +18 -2
  16. data/lib/new_relic/control/rails3.rb +75 -0
  17. data/lib/new_relic/local_environment.rb +11 -3
  18. data/lib/new_relic/noticed_error.rb +2 -1
  19. data/lib/new_relic/version.rb +10 -9
  20. data/newrelic_rpm.gemspec +195 -3
  21. data/rdoc/classes/NewRelic.html +293 -0
  22. data/rdoc/classes/NewRelic/Agent.html +810 -0
  23. data/rdoc/classes/NewRelic/Agent/Agent.html +742 -0
  24. data/rdoc/classes/NewRelic/Agent/BackgroundLoadingError.html +111 -0
  25. data/rdoc/classes/NewRelic/Agent/BusyCalculator.html +309 -0
  26. data/rdoc/classes/NewRelic/Agent/CollectionHelper.html +196 -0
  27. data/rdoc/classes/NewRelic/Agent/ErrorCollector.html +378 -0
  28. data/rdoc/classes/NewRelic/Agent/ForceDisconnectException.html +118 -0
  29. data/rdoc/classes/NewRelic/Agent/ForceRestartException.html +117 -0
  30. data/rdoc/classes/NewRelic/Agent/IgnoreSilentlyException.html +118 -0
  31. data/rdoc/classes/NewRelic/Agent/Instrumentation.html +174 -0
  32. data/rdoc/classes/NewRelic/Agent/Instrumentation/ActiveRecordInstrumentation.html +221 -0
  33. data/rdoc/classes/NewRelic/Agent/Instrumentation/ControllerInstrumentation.html +349 -0
  34. data/rdoc/classes/NewRelic/Agent/Instrumentation/ControllerInstrumentation/ClassMethods.html +277 -0
  35. data/rdoc/classes/NewRelic/Agent/Instrumentation/DelayedJobInstrumentation.html +112 -0
  36. data/rdoc/classes/NewRelic/Agent/Instrumentation/MetricFrame.html +1007 -0
  37. data/rdoc/classes/NewRelic/Agent/Instrumentation/Rack.html +321 -0
  38. data/rdoc/classes/NewRelic/Agent/Instrumentation/Sinatra.html +176 -0
  39. data/rdoc/classes/NewRelic/Agent/LicenseException.html +117 -0
  40. data/rdoc/classes/NewRelic/Agent/MethodTracer.html +150 -0
  41. data/rdoc/classes/NewRelic/Agent/MethodTracer/ClassMethods.html +295 -0
  42. data/rdoc/classes/NewRelic/Agent/MethodTracer/InstanceMethods.html +284 -0
  43. data/rdoc/classes/NewRelic/Agent/PostTooBigException.html +120 -0
  44. data/rdoc/classes/NewRelic/Agent/Sampler.html +314 -0
  45. data/rdoc/classes/NewRelic/Agent/Sampler/Unsupported.html +117 -0
  46. data/rdoc/classes/NewRelic/Agent/Samplers.html +126 -0
  47. data/rdoc/classes/NewRelic/Agent/Samplers/CpuSampler.html +327 -0
  48. data/rdoc/classes/NewRelic/Agent/Samplers/DelayedJobLockSampler.html +296 -0
  49. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler.html +321 -0
  50. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/Base.html +186 -0
  51. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/JavaHeapSampler.html +173 -0
  52. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/ProcStatus.html +216 -0
  53. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/ShellPS.html +207 -0
  54. data/rdoc/classes/NewRelic/Agent/Samplers/ObjectSampler.html +222 -0
  55. data/rdoc/classes/NewRelic/Agent/ServerError.html +117 -0
  56. data/rdoc/classes/NewRelic/Agent/ShimAgent.html +297 -0
  57. data/rdoc/classes/NewRelic/Agent/StatsEngine.html +204 -0
  58. data/rdoc/classes/NewRelic/Agent/StatsEngine/MetricStats.html +441 -0
  59. data/rdoc/classes/NewRelic/Agent/StatsEngine/Samplers.html +237 -0
  60. data/rdoc/classes/NewRelic/Agent/StatsEngine/ScopeStackElement.html +178 -0
  61. data/rdoc/classes/NewRelic/Agent/StatsEngine/Transactions.html +385 -0
  62. data/rdoc/classes/NewRelic/Agent/TransactionSampleBuilder.html +505 -0
  63. data/rdoc/classes/NewRelic/Agent/TransactionSampler.html +690 -0
  64. data/rdoc/classes/NewRelic/Agent/WorkerLoop.html +305 -0
  65. data/rdoc/classes/NewRelic/Agent/WorkerLoop/LoopTask.html +224 -0
  66. data/rdoc/classes/NewRelic/ApdexStats.html +196 -0
  67. data/rdoc/classes/NewRelic/BasicStats.html +113 -0
  68. data/rdoc/classes/NewRelic/ChainedCall.html +180 -0
  69. data/rdoc/classes/NewRelic/Commands.html +112 -0
  70. data/rdoc/classes/NewRelic/Commands/CommandFailure.html +167 -0
  71. data/rdoc/classes/NewRelic/Commands/Deployments.html +285 -0
  72. data/rdoc/classes/NewRelic/Control.html +1760 -0
  73. data/rdoc/classes/NewRelic/Control/External.html +148 -0
  74. data/rdoc/classes/NewRelic/Control/Merb.html +227 -0
  75. data/rdoc/classes/NewRelic/Control/Rails.html +542 -0
  76. data/rdoc/classes/NewRelic/Control/Ruby.html +266 -0
  77. data/rdoc/classes/NewRelic/Control/Sinatra.html +178 -0
  78. data/rdoc/classes/NewRelic/DelayedJobInjection.html +118 -0
  79. data/rdoc/classes/NewRelic/Histogram.html +226 -0
  80. data/rdoc/classes/NewRelic/Histogram/Bucket.html +319 -0
  81. data/rdoc/classes/NewRelic/Histogram/Shim.html +144 -0
  82. data/rdoc/classes/NewRelic/LocalEnvironment.html +572 -0
  83. data/rdoc/classes/NewRelic/MerbBootLoader.html +146 -0
  84. data/rdoc/classes/NewRelic/MethodTraceStats.html +250 -0
  85. data/rdoc/classes/NewRelic/MetricData.html +347 -0
  86. data/rdoc/classes/NewRelic/MetricParser.html +747 -0
  87. data/rdoc/classes/NewRelic/MetricParser/ActionMailer.html +170 -0
  88. data/rdoc/classes/NewRelic/MetricParser/ActiveMerchant.html +267 -0
  89. data/rdoc/classes/NewRelic/MetricParser/ActiveRecord.html +250 -0
  90. data/rdoc/classes/NewRelic/MetricParser/Controller.html +363 -0
  91. data/rdoc/classes/NewRelic/MetricParser/ControllerCPU.html +319 -0
  92. data/rdoc/classes/NewRelic/MetricParser/Errors.html +170 -0
  93. data/rdoc/classes/NewRelic/MetricParser/External.html +339 -0
  94. data/rdoc/classes/NewRelic/MetricParser/MemCache.html +340 -0
  95. data/rdoc/classes/NewRelic/MetricParser/OtherTransaction.html +205 -0
  96. data/rdoc/classes/NewRelic/MetricParser/View.html +381 -0
  97. data/rdoc/classes/NewRelic/MetricParser/WebFrontend.html +182 -0
  98. data/rdoc/classes/NewRelic/MetricParser/WebService.html +172 -0
  99. data/rdoc/classes/NewRelic/MetricSpec.html +406 -0
  100. data/rdoc/classes/NewRelic/Metrics.html +138 -0
  101. data/rdoc/classes/NewRelic/NoticedError.html +200 -0
  102. data/rdoc/classes/NewRelic/Rack.html +112 -0
  103. data/rdoc/classes/NewRelic/Rack/MetricApp.html +193 -0
  104. data/rdoc/classes/NewRelic/Rack/Status.html +165 -0
  105. data/rdoc/classes/NewRelic/ScopedMethodTraceStats.html +225 -0
  106. data/rdoc/classes/NewRelic/Stats.html +917 -0
  107. data/rdoc/classes/NewRelic/StatsBase.html +346 -0
  108. data/rdoc/classes/NewRelic/TransactionAnalysis.html +269 -0
  109. data/rdoc/classes/NewRelic/TransactionAnalysis/SegmentSummary.html +338 -0
  110. data/rdoc/classes/NewRelic/TransactionSample.html +766 -0
  111. data/rdoc/classes/NewRelic/TransactionSample/CompositeSegment.html +195 -0
  112. data/rdoc/classes/NewRelic/TransactionSample/FakeSegment.html +113 -0
  113. data/rdoc/classes/NewRelic/TransactionSample/IDGenerator.html +178 -0
  114. data/rdoc/classes/NewRelic/TransactionSample/Segment.html +920 -0
  115. data/rdoc/classes/NewRelic/TransactionSample/SummarySegment.html +180 -0
  116. data/rdoc/classes/NewRelic/VersionNumber.html +338 -0
  117. data/rdoc/classes/NewRelicApi.html +270 -0
  118. data/rdoc/classes/NewRelicApi/Account.html +178 -0
  119. data/rdoc/classes/NewRelicApi/Account/AccountUsage.html +111 -0
  120. data/rdoc/classes/NewRelicApi/Account/AccountView.html +146 -0
  121. data/rdoc/classes/NewRelicApi/Application.html +139 -0
  122. data/rdoc/classes/NewRelicApi/Application/Agent.html +119 -0
  123. data/rdoc/classes/NewRelicApi/Deployment.html +123 -0
  124. data/rdoc/classes/NewRelicApi/Subscription.html +111 -0
  125. data/rdoc/classes/NewRelicApi/ThresholdValue.html +174 -0
  126. data/rdoc/classes/NewRelicApi/User.html +111 -0
  127. data/rdoc/created.rid +1 -0
  128. data/rdoc/files/CHANGELOG.html +649 -0
  129. data/rdoc/files/LICENSE.html +143 -0
  130. data/rdoc/files/lib/new_relic/agent/agent_rb.html +113 -0
  131. data/rdoc/files/lib/new_relic/agent/busy_calculator_rb.html +115 -0
  132. data/rdoc/files/lib/new_relic/agent/chained_call_rb.html +107 -0
  133. data/rdoc/files/lib/new_relic/agent/collection_helper_rb.html +101 -0
  134. data/rdoc/files/lib/new_relic/agent/error_collector_rb.html +101 -0
  135. data/rdoc/files/lib/new_relic/agent/instrumentation/active_merchant_rb.html +107 -0
  136. data/rdoc/files/lib/new_relic/agent/instrumentation/active_record_instrumentation_rb.html +108 -0
  137. data/rdoc/files/lib/new_relic/agent/instrumentation/authlogic_rb.html +101 -0
  138. data/rdoc/files/lib/new_relic/agent/instrumentation/controller_instrumentation_rb.html +108 -0
  139. data/rdoc/files/lib/new_relic/agent/instrumentation/data_mapper_rb.html +191 -0
  140. data/rdoc/files/lib/new_relic/agent/instrumentation/delayed_job_instrumentation_rb.html +109 -0
  141. data/rdoc/files/lib/new_relic/agent/instrumentation/memcache_rb.html +152 -0
  142. data/rdoc/files/lib/new_relic/agent/instrumentation/merb/controller_rb.html +155 -0
  143. data/rdoc/files/lib/new_relic/agent/instrumentation/merb/errors_rb.html +107 -0
  144. data/rdoc/files/lib/new_relic/agent/instrumentation/metric_frame_rb.html +113 -0
  145. data/rdoc/files/lib/new_relic/agent/instrumentation/net_rb.html +172 -0
  146. data/rdoc/files/lib/new_relic/agent/instrumentation/passenger_instrumentation_rb.html +101 -0
  147. data/rdoc/files/lib/new_relic/agent/instrumentation/rack_rb.html +108 -0
  148. data/rdoc/files/lib/new_relic/agent/instrumentation/rails/action_controller_rb.html +152 -0
  149. data/rdoc/files/lib/new_relic/agent/instrumentation/rails/action_web_service_rb.html +108 -0
  150. data/rdoc/files/lib/new_relic/agent/instrumentation/rails/errors_rb.html +167 -0
  151. data/rdoc/files/lib/new_relic/agent/instrumentation/sinatra_rb.html +108 -0
  152. data/rdoc/files/lib/new_relic/agent/method_tracer_rb.html +108 -0
  153. data/rdoc/files/lib/new_relic/agent/sampler_rb.html +116 -0
  154. data/rdoc/files/lib/new_relic/agent/samplers/cpu_sampler_rb.html +101 -0
  155. data/rdoc/files/lib/new_relic/agent/samplers/delayed_job_lock_sampler_rb.html +101 -0
  156. data/rdoc/files/lib/new_relic/agent/samplers/memory_sampler_rb.html +101 -0
  157. data/rdoc/files/lib/new_relic/agent/samplers/object_sampler_rb.html +101 -0
  158. data/rdoc/files/lib/new_relic/agent/shim_agent_rb.html +108 -0
  159. data/rdoc/files/lib/new_relic/agent/stats_engine/metric_stats_rb.html +101 -0
  160. data/rdoc/files/lib/new_relic/agent/stats_engine/samplers_rb.html +101 -0
  161. data/rdoc/files/lib/new_relic/agent/stats_engine/transactions_rb.html +101 -0
  162. data/rdoc/files/lib/new_relic/agent/stats_engine_rb.html +110 -0
  163. data/rdoc/files/lib/new_relic/agent/transaction_sampler_rb.html +101 -0
  164. data/rdoc/files/lib/new_relic/agent/worker_loop_rb.html +101 -0
  165. data/rdoc/files/lib/new_relic/agent_rb.html +204 -0
  166. data/rdoc/files/lib/new_relic/commands/deployments_rb.html +119 -0
  167. data/rdoc/files/lib/new_relic/commands/new_relic_commands_rb.html +108 -0
  168. data/rdoc/files/lib/new_relic/control/external_rb.html +117 -0
  169. data/rdoc/files/lib/new_relic/control/merb_rb.html +101 -0
  170. data/rdoc/files/lib/new_relic/control/rails_rb.html +108 -0
  171. data/rdoc/files/lib/new_relic/control/ruby_rb.html +110 -0
  172. data/rdoc/files/lib/new_relic/control/sinatra_rb.html +108 -0
  173. data/rdoc/files/lib/new_relic/control_rb.html +116 -0
  174. data/rdoc/files/lib/new_relic/delayed_job_injection_rb.html +180 -0
  175. data/rdoc/files/lib/new_relic/histogram_rb.html +114 -0
  176. data/rdoc/files/lib/new_relic/local_environment_rb.html +111 -0
  177. data/rdoc/files/lib/new_relic/merbtasks_rb.html +101 -0
  178. data/rdoc/files/lib/new_relic/metric_data_rb.html +101 -0
  179. data/rdoc/files/lib/new_relic/metric_parser/action_mailer_rb.html +101 -0
  180. data/rdoc/files/lib/new_relic/metric_parser/active_merchant_rb.html +101 -0
  181. data/rdoc/files/lib/new_relic/metric_parser/active_record_rb.html +101 -0
  182. data/rdoc/files/lib/new_relic/metric_parser/controller_cpu_rb.html +101 -0
  183. data/rdoc/files/lib/new_relic/metric_parser/controller_rb.html +101 -0
  184. data/rdoc/files/lib/new_relic/metric_parser/errors_rb.html +101 -0
  185. data/rdoc/files/lib/new_relic/metric_parser/external_rb.html +101 -0
  186. data/rdoc/files/lib/new_relic/metric_parser/mem_cache_rb.html +101 -0
  187. data/rdoc/files/lib/new_relic/metric_parser/other_transaction_rb.html +108 -0
  188. data/rdoc/files/lib/new_relic/metric_parser/view_rb.html +101 -0
  189. data/rdoc/files/lib/new_relic/metric_parser/web_frontend_rb.html +107 -0
  190. data/rdoc/files/lib/new_relic/metric_parser/web_service_rb.html +101 -0
  191. data/rdoc/files/lib/new_relic/metric_parser_rb.html +101 -0
  192. data/rdoc/files/lib/new_relic/metric_spec_rb.html +108 -0
  193. data/rdoc/files/lib/new_relic/metrics_rb.html +101 -0
  194. data/rdoc/files/lib/new_relic/noticed_error_rb.html +107 -0
  195. data/rdoc/files/lib/new_relic/rack/metric_app_rb.html +108 -0
  196. data/rdoc/files/lib/new_relic/rack_app_rb.html +110 -0
  197. data/rdoc/files/lib/new_relic/recipes_rb.html +128 -0
  198. data/rdoc/files/lib/new_relic/stats_rb.html +101 -0
  199. data/rdoc/files/lib/new_relic/transaction_analysis_rb.html +108 -0
  200. data/rdoc/files/lib/new_relic/transaction_sample_rb.html +101 -0
  201. data/rdoc/files/lib/new_relic/version_rb.html +101 -0
  202. data/rdoc/files/lib/new_relic_api_rb.html +145 -0
  203. data/rdoc/files/lib/newrelic_rpm_rb.html +147 -0
  204. data/rdoc/files/lib/tasks/all_rb.html +107 -0
  205. data/rdoc/fr_class_index.html +134 -0
  206. data/rdoc/fr_file_index.html +103 -0
  207. data/rdoc/fr_method_index.html +568 -0
  208. data/rdoc/index.html +24 -0
  209. data/rdoc/rdoc-style.css +208 -0
  210. data/test/new_relic/agent/active_record_instrumentation_test.rb +16 -5
  211. data/test/new_relic/agent/collection_helper_test.rb +1 -1
  212. data/test/new_relic/agent/error_collector_test.rb +2 -4
  213. data/test/new_relic/agent/rpm_agent_test.rb +1 -1
  214. data/test/new_relic/agent/task_instrumentation_test.rb +1 -1
  215. data/test/new_relic/agent/worker_loop_test.rb +33 -76
  216. data/test/new_relic/control_test.rb +9 -2
  217. data/test/new_relic/stats_test.rb +29 -1
  218. data/test/new_relic/version_number_test.rb +13 -0
  219. data/ui/helpers/newrelic_helper.rb +1 -2
  220. metadata +196 -4
@@ -0,0 +1,284 @@
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::MethodTracer::InstanceMethods</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::MethodTracer::InstanceMethods</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/method_tracer_rb.html">
59
+ lib/new_relic/agent/method_tracer.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000203">trace_execution_scoped</a>&nbsp;&nbsp;
84
+ <a href="#M000201">trace_execution_unscoped</a>&nbsp;&nbsp;
85
+ <a href="#M000202">trace_method_execution_no_scope</a>&nbsp;&nbsp;
86
+ </div>
87
+ </div>
88
+
89
+ </div>
90
+
91
+
92
+ <!-- if includes -->
93
+
94
+ <div id="section">
95
+
96
+
97
+ <div id="constants-list">
98
+ <h3 class="section-bar">Constants</h3>
99
+
100
+ <div class="name-list">
101
+ <table summary="Constants">
102
+ <tr class="top-aligned-row context-row">
103
+ <td class="context-item-name">EMPTY_ARRAY</td>
104
+ <td>=</td>
105
+ <td class="context-item-value">[].freeze</td>
106
+ </tr>
107
+ </table>
108
+ </div>
109
+ </div>
110
+
111
+
112
+
113
+
114
+
115
+
116
+ <!-- if method_list -->
117
+ <div id="methods">
118
+ <h3 class="section-bar">Public Instance methods</h3>
119
+
120
+ <div id="method-M000203" class="method-detail">
121
+ <a name="M000203"></a>
122
+
123
+ <div class="method-heading">
124
+ <a href="#M000203" class="method-signature">
125
+ <span class="method-name">trace_execution_scoped</span><span class="method-args">(metric_names, options={}) {|unless NewRelic::Agent.is_execution_traced? || options[:force]| ...}</span>
126
+ </a>
127
+ </div>
128
+
129
+ <div class="method-description">
130
+ <p>
131
+ Trace a given block with stats and keep track of the caller. See
132
+ add_method_tracer for a description of the arguments. <tt>metric_names</tt>
133
+ is either a single name or an array of metric names. If more than one
134
+ metric is passed, the <tt>produce_metric</tt> option only applies to the
135
+ first. The others are always recorded. Only the first metric is pushed onto
136
+ the scope stack.
137
+ </p>
138
+ <p>
139
+ Generally you pass an array of metric names if you want to record the
140
+ metric under additional categories, but generally this *should never ever
141
+ be done*. Most of the time you can aggregate on the server.
142
+ </p>
143
+ <p><a class="source-toggle" href="#"
144
+ onclick="toggleCode('M000203-source');return false;">[Source]</a></p>
145
+ <div class="method-source-code" id="M000203-source">
146
+ <pre>
147
+ <span class="ruby-comment cmt"># File lib/new_relic/agent/method_tracer.rb, line 106</span>
148
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">trace_execution_scoped</span>(<span class="ruby-identifier">metric_names</span>, <span class="ruby-identifier">options</span>={})
149
+
150
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span>.<span class="ruby-identifier">is_execution_traced?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:force</span>]
151
+
152
+ <span class="ruby-identifier">produce_metric</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:metric</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">false</span>
153
+ <span class="ruby-identifier">deduct_call_time_from_parent</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:deduct_call_time_from_parent</span>] <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">false</span>
154
+ <span class="ruby-identifier">scoped_metric_only</span> = <span class="ruby-identifier">produce_metric</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:scoped_metric_only</span>]
155
+ <span class="ruby-identifier">t0</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_f</span>
156
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">metric_names</span>.<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">Array</span>
157
+ <span class="ruby-identifier">first_name</span> = <span class="ruby-identifier">metric_names</span>.<span class="ruby-identifier">first</span>
158
+ <span class="ruby-identifier">metric_stats</span> = []
159
+ <span class="ruby-identifier">metric_stats</span> <span class="ruby-operator">&lt;&lt;</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">stats_engine</span>.<span class="ruby-identifier">get_stats</span>(<span class="ruby-identifier">first_name</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">scoped_metric_only</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">produce_metric</span>
160
+ <span class="ruby-identifier">metric_names</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">|</span>
161
+ <span class="ruby-identifier">metric_stats</span> <span class="ruby-operator">&lt;&lt;</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">stats_engine</span>.<span class="ruby-identifier">get_stats_no_scope</span>(<span class="ruby-identifier">name</span>)
162
+ <span class="ruby-keyword kw">end</span>
163
+ <span class="ruby-keyword kw">else</span>
164
+ <span class="ruby-identifier">first_name</span> = <span class="ruby-identifier">metric_names</span>
165
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">produce_metric</span>
166
+ <span class="ruby-identifier">metric_stats</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">stats_engine</span>.<span class="ruby-identifier">get_stats</span>(<span class="ruby-identifier">first_name</span>, <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">scoped_metric_only</span>)]
167
+ <span class="ruby-keyword kw">else</span>
168
+ <span class="ruby-identifier">metric_stats</span> = <span class="ruby-constant">EMPTY_ARRAY</span>
169
+ <span class="ruby-keyword kw">end</span>
170
+ <span class="ruby-keyword kw">end</span>
171
+
172
+ <span class="ruby-keyword kw">begin</span>
173
+ <span class="ruby-comment cmt"># Keep a reference to the scope we are pushing so we can do a sanity check making</span>
174
+ <span class="ruby-comment cmt"># sure when we pop we get the one we 'expected'</span>
175
+ <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">push_trace_execution_flag</span>(<span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:force</span>]
176
+ <span class="ruby-identifier">expected_scope</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">stats_engine</span>.<span class="ruby-identifier">push_scope</span>(<span class="ruby-identifier">first_name</span>, <span class="ruby-identifier">t0</span>, <span class="ruby-identifier">deduct_call_time_from_parent</span>)
177
+ <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
178
+ <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">log</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">&quot;Caught exception in trace_method_execution header. Metric name = #{first_name}, exception = #{e}&quot;</span>)
179
+ <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">log</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>))
180
+ <span class="ruby-keyword kw">end</span>
181
+
182
+ <span class="ruby-keyword kw">begin</span>
183
+ <span class="ruby-keyword kw">yield</span>
184
+ <span class="ruby-keyword kw">ensure</span>
185
+ <span class="ruby-identifier">t1</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_f</span>
186
+ <span class="ruby-identifier">duration</span> = <span class="ruby-identifier">t1</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">t0</span>
187
+
188
+ <span class="ruby-keyword kw">begin</span>
189
+ <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">pop_trace_execution_flag</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:force</span>]
190
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">expected_scope</span>
191
+ <span class="ruby-identifier">scope</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">stats_engine</span>.<span class="ruby-identifier">pop_scope</span> <span class="ruby-identifier">expected_scope</span>, <span class="ruby-identifier">duration</span>, <span class="ruby-identifier">t1</span>
192
+ <span class="ruby-identifier">exclusive</span> = <span class="ruby-identifier">duration</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">scope</span>.<span class="ruby-identifier">children_time</span>
193
+ <span class="ruby-identifier">metric_stats</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">stats</span><span class="ruby-operator">|</span> <span class="ruby-identifier">stats</span>.<span class="ruby-identifier">trace_call</span>(<span class="ruby-identifier">duration</span>, <span class="ruby-identifier">exclusive</span>) }
194
+ <span class="ruby-keyword kw">end</span>
195
+ <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
196
+ <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">log</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">&quot;Caught exception in trace_method_execution footer. Metric name = #{first_name}, exception = #{e}&quot;</span>)
197
+ <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">log</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>))
198
+ <span class="ruby-keyword kw">end</span>
199
+ <span class="ruby-keyword kw">end</span>
200
+ <span class="ruby-keyword kw">end</span>
201
+ </pre>
202
+ </div>
203
+ </div>
204
+ </div>
205
+
206
+ <div id="method-M000201" class="method-detail">
207
+ <a name="M000201"></a>
208
+
209
+ <div class="method-heading">
210
+ <a href="#M000201" class="method-signature">
211
+ <span class="method-name">trace_execution_unscoped</span><span class="method-args">(metric_names, options={}) {|unless NewRelic::Agent.is_execution_traced?| ...}</span>
212
+ </a>
213
+ </div>
214
+
215
+ <div class="method-description">
216
+ <p>
217
+ Trace a given block with stats assigned to the given metric_name. It does
218
+ not provide scoped measurements, meaning whatever is being traced will not
219
+ &#8216;blame the Controller&#8217;&#8212;that is to say appear in the
220
+ breakdown chart. This is code is inlined in add_method_tracer.
221
+ </p>
222
+ <ul>
223
+ <li><tt>metric_names</tt> is a single name or an array of names of metrics
224
+
225
+ </li>
226
+ <li><tt>:force =&gt; true</tt> will force the metric to be captured even when
227
+ tracing is disabled with <a
228
+ href="../../Agent.html#M000117">NewRelic::Agent#disable_all_tracing</a>
229
+
230
+ </li>
231
+ </ul>
232
+ <p><a class="source-toggle" href="#"
233
+ onclick="toggleCode('M000201-source');return false;">[Source]</a></p>
234
+ <div class="method-source-code" id="M000201-source">
235
+ <pre>
236
+ <span class="ruby-comment cmt"># File lib/new_relic/agent/method_tracer.rb, line 68</span>
237
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">trace_execution_unscoped</span>(<span class="ruby-identifier">metric_names</span>, <span class="ruby-identifier">options</span>={})
238
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span>.<span class="ruby-identifier">is_execution_traced?</span>
239
+ <span class="ruby-identifier">t0</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_f</span>
240
+ <span class="ruby-identifier">stats</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">metric_names</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">metric_name</span> <span class="ruby-operator">|</span>
241
+ <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">stats_engine</span>.<span class="ruby-identifier">get_stats_no_scope</span> <span class="ruby-identifier">metric_name</span>
242
+ <span class="ruby-keyword kw">end</span>
243
+ <span class="ruby-keyword kw">begin</span>
244
+ <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">push_trace_execution_flag</span>(<span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:force</span>]
245
+ <span class="ruby-keyword kw">yield</span>
246
+ <span class="ruby-keyword kw">ensure</span>
247
+ <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">pop_trace_execution_flag</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:force</span>]
248
+ <span class="ruby-identifier">duration</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">t0</span> <span class="ruby-comment cmt"># for some reason this is 3 usec faster than Time - Time</span>
249
+ <span class="ruby-identifier">stats</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">stat</span><span class="ruby-operator">|</span> <span class="ruby-identifier">stat</span>.<span class="ruby-identifier">trace_call</span>(<span class="ruby-identifier">duration</span>) }
250
+ <span class="ruby-keyword kw">end</span>
251
+ <span class="ruby-keyword kw">end</span>
252
+ </pre>
253
+ </div>
254
+ </div>
255
+ </div>
256
+
257
+ <div id="method-M000202" class="method-detail">
258
+ <a name="M000202"></a>
259
+
260
+ <div class="method-heading">
261
+ <span class="method-name">trace_method_execution_no_scope</span><span class="method-args">(metric_names, options={})</span>
262
+ </div>
263
+
264
+ <div class="method-description">
265
+ <p>
266
+ Alias for <a
267
+ href="InstanceMethods.html#M000201">trace_execution_unscoped</a>
268
+ </p>
269
+ </div>
270
+ </div>
271
+
272
+
273
+ </div>
274
+
275
+
276
+ </div>
277
+
278
+
279
+ <div id="validator-badges">
280
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
281
+ </div>
282
+
283
+ </body>
284
+ </html>
@@ -0,0 +1,120 @@
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>Class: NewRelic::Agent::PostTooBigException</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>Class</strong></td>
53
+ <td class="class-name-in-header">NewRelic::Agent::PostTooBigException</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_rb.html">
59
+ lib/new_relic/agent.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="IgnoreSilentlyException.html">
69
+ IgnoreSilentlyException
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+ <div id="description">
84
+ <p>
85
+ Used for when a transaction trace or error report has too much data, so we
86
+ reset the queue to clear the extra-large item
87
+ </p>
88
+
89
+ </div>
90
+
91
+
92
+ </div>
93
+
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+
111
+
112
+ </div>
113
+
114
+
115
+ <div id="validator-badges">
116
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
117
+ </div>
118
+
119
+ </body>
120
+ </html>
@@ -0,0 +1,314 @@
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>Class: NewRelic::Agent::Sampler</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>Class</strong></td>
53
+ <td class="class-name-in-header">NewRelic::Agent::Sampler</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/sampler_rb.html">
59
+ lib/new_relic/agent/sampler.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ A <a href="Sampler.html">Sampler</a> is used to capture meaningful metrics
84
+ in a background thread periodically. They will either be invoked once a
85
+ minute just before the data is sent to the agent (default) or every 10
86
+ seconds, when use_harvest_sampler? returns false.
87
+ </p>
88
+ <p>
89
+ <a href="Samplers.html">Samplers</a> can be added to New Relic by
90
+ subclassing <a href="Sampler.html">NewRelic::Agent::Sampler</a>. Instances
91
+ are created when the agent is enabled and installed. Subclasses are
92
+ registered for instantiation automatically.
93
+ </p>
94
+
95
+ </div>
96
+
97
+
98
+ </div>
99
+
100
+ <div id="method-list">
101
+ <h3 class="section-bar">Methods</h3>
102
+
103
+ <div class="name-list">
104
+ <a href="#M000300">inherited</a>&nbsp;&nbsp;
105
+ <a href="#M000304">new</a>&nbsp;&nbsp;
106
+ <a href="#M000305">poll</a>&nbsp;&nbsp;
107
+ <a href="#M000303">sampler_classes</a>&nbsp;&nbsp;
108
+ <a href="#M000301">supported_on_this_platform?</a>&nbsp;&nbsp;
109
+ <a href="#M000302">use_harvest_sampler?</a>&nbsp;&nbsp;
110
+ </div>
111
+ </div>
112
+
113
+ </div>
114
+
115
+
116
+ <!-- if includes -->
117
+
118
+ <div id="section">
119
+
120
+ <div id="class-list">
121
+ <h3 class="section-bar">Classes and Modules</h3>
122
+
123
+ Class <a href="Sampler/Unsupported.html" class="link">NewRelic::Agent::Sampler::Unsupported</a><br />
124
+
125
+ </div>
126
+
127
+
128
+
129
+
130
+ <div id="attribute-list">
131
+ <h3 class="section-bar">Attributes</h3>
132
+
133
+ <div class="name-list">
134
+ <table>
135
+ <tr class="top-aligned-row context-row">
136
+ <td class="context-item-name">id</td>
137
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
138
+ <td class="context-item-desc"></td>
139
+ </tr>
140
+ <tr class="top-aligned-row context-row">
141
+ <td class="context-item-name">stats_engine</td>
142
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
143
+ <td class="context-item-desc"></td>
144
+ </tr>
145
+ </table>
146
+ </div>
147
+ </div>
148
+
149
+
150
+
151
+ <!-- if method_list -->
152
+ <div id="methods">
153
+ <h3 class="section-bar">Public Class methods</h3>
154
+
155
+ <div id="method-M000300" class="method-detail">
156
+ <a name="M000300"></a>
157
+
158
+ <div class="method-heading">
159
+ <a href="#M000300" class="method-signature">
160
+ <span class="method-name">inherited</span><span class="method-args">(subclass)</span>
161
+ </a>
162
+ </div>
163
+
164
+ <div class="method-description">
165
+ <p><a class="source-toggle" href="#"
166
+ onclick="toggleCode('M000300-source');return false;">[Source]</a></p>
167
+ <div class="method-source-code" id="M000300-source">
168
+ <pre>
169
+ <span class="ruby-comment cmt"># File lib/new_relic/agent/sampler.rb, line 18</span>
170
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inherited</span>(<span class="ruby-identifier">subclass</span>)
171
+ <span class="ruby-ivar">@sampler_classes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">subclass</span>
172
+ <span class="ruby-keyword kw">end</span>
173
+ </pre>
174
+ </div>
175
+ </div>
176
+ </div>
177
+
178
+ <div id="method-M000304" class="method-detail">
179
+ <a name="M000304"></a>
180
+
181
+ <div class="method-heading">
182
+ <a href="#M000304" class="method-signature">
183
+ <span class="method-name">new</span><span class="method-args">(id)</span>
184
+ </a>
185
+ </div>
186
+
187
+ <div class="method-description">
188
+ <p><a class="source-toggle" href="#"
189
+ onclick="toggleCode('M000304-source');return false;">[Source]</a></p>
190
+ <div class="method-source-code" id="M000304-source">
191
+ <pre>
192
+ <span class="ruby-comment cmt"># File lib/new_relic/agent/sampler.rb, line 37</span>
193
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">id</span>)
194
+ <span class="ruby-ivar">@id</span> = <span class="ruby-identifier">id</span>
195
+ <span class="ruby-keyword kw">end</span>
196
+ </pre>
197
+ </div>
198
+ </div>
199
+ </div>
200
+
201
+ <div id="method-M000303" class="method-detail">
202
+ <a name="M000303"></a>
203
+
204
+ <div class="method-heading">
205
+ <a href="#M000303" class="method-signature">
206
+ <span class="method-name">sampler_classes</span><span class="method-args">()</span>
207
+ </a>
208
+ </div>
209
+
210
+ <div class="method-description">
211
+ <p><a class="source-toggle" href="#"
212
+ onclick="toggleCode('M000303-source');return false;">[Source]</a></p>
213
+ <div class="method-source-code" id="M000303-source">
214
+ <pre>
215
+ <span class="ruby-comment cmt"># File lib/new_relic/agent/sampler.rb, line 33</span>
216
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sampler_classes</span>
217
+ <span class="ruby-ivar">@sampler_classes</span>
218
+ <span class="ruby-keyword kw">end</span>
219
+ </pre>
220
+ </div>
221
+ </div>
222
+ </div>
223
+
224
+ <div id="method-M000301" class="method-detail">
225
+ <a name="M000301"></a>
226
+
227
+ <div class="method-heading">
228
+ <a href="#M000301" class="method-signature">
229
+ <span class="method-name">supported_on_this_platform?</span><span class="method-args">()</span>
230
+ </a>
231
+ </div>
232
+
233
+ <div class="method-description">
234
+ <p>
235
+ Override with check. Called before instantiating.
236
+ </p>
237
+ <p><a class="source-toggle" href="#"
238
+ onclick="toggleCode('M000301-source');return false;">[Source]</a></p>
239
+ <div class="method-source-code" id="M000301-source">
240
+ <pre>
241
+ <span class="ruby-comment cmt"># File lib/new_relic/agent/sampler.rb, line 23</span>
242
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">supported_on_this_platform?</span>
243
+ <span class="ruby-keyword kw">true</span>
244
+ <span class="ruby-keyword kw">end</span>
245
+ </pre>
246
+ </div>
247
+ </div>
248
+ </div>
249
+
250
+ <div id="method-M000302" class="method-detail">
251
+ <a name="M000302"></a>
252
+
253
+ <div class="method-heading">
254
+ <a href="#M000302" class="method-signature">
255
+ <span class="method-name">use_harvest_sampler?</span><span class="method-args">()</span>
256
+ </a>
257
+ </div>
258
+
259
+ <div class="method-description">
260
+ <p>
261
+ Override to use the periodic sampler instead of running the sampler on the
262
+ minute during harvests.
263
+ </p>
264
+ <p><a class="source-toggle" href="#"
265
+ onclick="toggleCode('M000302-source');return false;">[Source]</a></p>
266
+ <div class="method-source-code" id="M000302-source">
267
+ <pre>
268
+ <span class="ruby-comment cmt"># File lib/new_relic/agent/sampler.rb, line 29</span>
269
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">use_harvest_sampler?</span>
270
+ <span class="ruby-keyword kw">true</span>
271
+ <span class="ruby-keyword kw">end</span>
272
+ </pre>
273
+ </div>
274
+ </div>
275
+ </div>
276
+
277
+ <h3 class="section-bar">Public Instance methods</h3>
278
+
279
+ <div id="method-M000305" class="method-detail">
280
+ <a name="M000305"></a>
281
+
282
+ <div class="method-heading">
283
+ <a href="#M000305" class="method-signature">
284
+ <span class="method-name">poll</span><span class="method-args">()</span>
285
+ </a>
286
+ </div>
287
+
288
+ <div class="method-description">
289
+ <p><a class="source-toggle" href="#"
290
+ onclick="toggleCode('M000305-source');return false;">[Source]</a></p>
291
+ <div class="method-source-code" id="M000305-source">
292
+ <pre>
293
+ <span class="ruby-comment cmt"># File lib/new_relic/agent/sampler.rb, line 41</span>
294
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">poll</span>
295
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Implement in the subclass&quot;</span>
296
+ <span class="ruby-keyword kw">end</span>
297
+ </pre>
298
+ </div>
299
+ </div>
300
+ </div>
301
+
302
+
303
+ </div>
304
+
305
+
306
+ </div>
307
+
308
+
309
+ <div id="validator-badges">
310
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
311
+ </div>
312
+
313
+ </body>
314
+ </html>