wd_newrelic_rpm 3.3.4.1 → 3.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. data/.gitignore +20 -0
  2. data/.project +23 -0
  3. data/.travis.yml +9 -0
  4. data/CHANGELOG +317 -39
  5. data/GUIDELINES_FOR_CONTRIBUTING.md +76 -0
  6. data/Gemfile +16 -0
  7. data/LICENSE +1 -1
  8. data/{README.rdoc → README.md} +71 -55
  9. data/Rakefile +62 -0
  10. data/bin/mongrel_rpm +1 -1
  11. data/config.dot +290 -0
  12. data/config/database.yml +5 -0
  13. data/init.rb +31 -0
  14. data/lib/new_relic/agent.rb +31 -60
  15. data/lib/new_relic/agent/agent.rb +277 -502
  16. data/lib/new_relic/agent/agent_logger.rb +165 -0
  17. data/lib/new_relic/agent/audit_logger.rb +72 -0
  18. data/lib/new_relic/agent/beacon_configuration.rb +36 -50
  19. data/lib/new_relic/agent/browser_monitoring.rb +114 -61
  20. data/lib/new_relic/agent/busy_calculator.rb +14 -6
  21. data/lib/new_relic/agent/configuration.rb +74 -0
  22. data/lib/new_relic/agent/configuration/defaults.rb +126 -0
  23. data/lib/new_relic/agent/configuration/environment_source.rb +49 -0
  24. data/lib/new_relic/agent/configuration/manager.rb +136 -0
  25. data/lib/new_relic/agent/configuration/mask_defaults.rb +10 -0
  26. data/lib/new_relic/agent/configuration/server_source.rb +27 -0
  27. data/lib/new_relic/agent/configuration/yaml_source.rb +63 -0
  28. data/lib/new_relic/agent/cross_process_monitoring.rb +43 -0
  29. data/lib/new_relic/agent/database.rb +39 -26
  30. data/lib/new_relic/agent/error_collector.rb +48 -49
  31. data/lib/new_relic/agent/instrumentation/active_merchant.rb +1 -1
  32. data/lib/new_relic/agent/instrumentation/active_record.rb +4 -7
  33. data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +1 -1
  34. data/lib/new_relic/agent/instrumentation/authlogic.rb +1 -1
  35. data/lib/new_relic/agent/instrumentation/browser_monitoring_timings.rb +41 -0
  36. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +35 -12
  37. data/lib/new_relic/agent/instrumentation/data_mapper.rb +4 -12
  38. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +2 -2
  39. data/lib/new_relic/agent/instrumentation/memcache.rb +6 -6
  40. data/lib/new_relic/agent/instrumentation/merb/controller.rb +1 -1
  41. data/lib/new_relic/agent/instrumentation/merb/errors.rb +1 -1
  42. data/lib/new_relic/agent/instrumentation/metric_frame.rb +4 -14
  43. data/lib/new_relic/agent/instrumentation/metric_frame/pop.rb +1 -1
  44. data/lib/new_relic/agent/instrumentation/net.rb +1 -1
  45. data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +6 -20
  46. data/lib/new_relic/agent/instrumentation/queue_time.rb +2 -2
  47. data/lib/new_relic/agent/instrumentation/rack.rb +1 -1
  48. data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +7 -7
  49. data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +1 -1
  50. data/lib/new_relic/agent/instrumentation/rails/errors.rb +1 -1
  51. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +5 -5
  52. data/lib/new_relic/agent/instrumentation/rails3/errors.rb +6 -2
  53. data/lib/new_relic/agent/instrumentation/resque.rb +81 -0
  54. data/lib/new_relic/agent/instrumentation/sinatra.rb +21 -10
  55. data/lib/new_relic/agent/instrumentation/sunspot.rb +1 -1
  56. data/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb +5 -4
  57. data/lib/new_relic/agent/method_tracer.rb +11 -9
  58. data/lib/new_relic/agent/new_relic_service.rb +379 -0
  59. data/lib/new_relic/agent/pipe_channel_manager.rb +175 -0
  60. data/lib/new_relic/agent/pipe_service.rb +58 -0
  61. data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +86 -0
  62. data/lib/new_relic/agent/samplers/memory_sampler.rb +6 -8
  63. data/lib/new_relic/agent/sql_sampler.rb +31 -74
  64. data/lib/new_relic/agent/stats_engine.rb +0 -5
  65. data/lib/new_relic/agent/stats_engine/gc_profiler.rb +40 -24
  66. data/lib/new_relic/agent/stats_engine/metric_stats.rb +89 -14
  67. data/lib/new_relic/agent/stats_engine/samplers.rb +9 -7
  68. data/lib/new_relic/agent/stats_engine/transactions.rb +20 -12
  69. data/lib/new_relic/agent/thread.rb +32 -0
  70. data/lib/new_relic/agent/thread_profiler.rb +306 -0
  71. data/lib/new_relic/agent/transaction_info.rb +24 -4
  72. data/lib/new_relic/agent/transaction_sample_builder.rb +12 -13
  73. data/lib/new_relic/agent/transaction_sampler.rb +49 -65
  74. data/lib/new_relic/agent/worker_loop.rb +31 -25
  75. data/lib/new_relic/collection_helper.rb +1 -1
  76. data/lib/new_relic/commands/deployments.rb +19 -10
  77. data/lib/new_relic/control.rb +1 -3
  78. data/lib/new_relic/control/class_methods.rb +10 -5
  79. data/lib/new_relic/control/frameworks/merb.rb +0 -6
  80. data/lib/new_relic/control/frameworks/rails.rb +30 -45
  81. data/lib/new_relic/control/frameworks/rails3.rb +23 -18
  82. data/lib/new_relic/control/frameworks/rails4.rb +23 -0
  83. data/lib/new_relic/control/frameworks/ruby.rb +2 -23
  84. data/lib/new_relic/control/instance_methods.rb +35 -73
  85. data/lib/new_relic/control/instrumentation.rb +7 -12
  86. data/lib/new_relic/control/server_methods.rb +17 -19
  87. data/lib/new_relic/delayed_job_injection.rb +2 -2
  88. data/lib/new_relic/helper.rb +34 -0
  89. data/lib/new_relic/language_support.rb +56 -37
  90. data/lib/new_relic/local_environment.rb +32 -67
  91. data/lib/new_relic/metric_data.rb +10 -2
  92. data/lib/new_relic/metric_spec.rb +7 -3
  93. data/lib/new_relic/noticed_error.rb +32 -9
  94. data/lib/new_relic/rack.rb +4 -0
  95. data/lib/new_relic/rack/browser_monitoring.rb +34 -25
  96. data/lib/new_relic/rack/developer_mode.rb +3 -0
  97. data/lib/new_relic/rack/error_collector.rb +56 -0
  98. data/lib/new_relic/stats.rb +9 -7
  99. data/lib/new_relic/transaction_sample.rb +19 -18
  100. data/lib/new_relic/transaction_sample/segment.rb +13 -15
  101. data/lib/new_relic/version.rb +19 -3
  102. data/lib/newrelic_rpm.rb +1 -1
  103. data/lib/tasks/tests.rake +6 -8
  104. data/newrelic.yml +15 -32
  105. data/newrelic_rpm.gemspec +224 -43
  106. data/newrelic_rpm.gemspec.erb +54 -0
  107. data/test/config/newrelic.yml +4 -3
  108. data/test/config/test_control.rb +18 -18
  109. data/test/fixtures/gemspec_no_build.rb +442 -0
  110. data/test/fixtures/gemspec_with_build.rb +442 -0
  111. data/test/fixtures/gemspec_with_build_and_stage.rb +442 -0
  112. data/test/intentional_fail.rb +10 -0
  113. data/test/multiverse/.gitignore +10 -0
  114. data/test/multiverse/README.md +85 -0
  115. data/test/multiverse/lib/multiverse/color.rb +13 -0
  116. data/test/multiverse/lib/multiverse/envfile.rb +66 -0
  117. data/test/multiverse/lib/multiverse/environment.rb +16 -0
  118. data/test/multiverse/lib/multiverse/output_collector.rb +29 -0
  119. data/test/multiverse/lib/multiverse/runner.rb +44 -0
  120. data/test/multiverse/lib/multiverse/suite.rb +162 -0
  121. data/test/multiverse/script/run_one +3 -0
  122. data/test/multiverse/script/runner +9 -0
  123. data/test/multiverse/suites/active_record/Envfile +13 -0
  124. data/test/multiverse/suites/active_record/ar_method_aliasing.rb +94 -0
  125. data/test/multiverse/suites/active_record/config/newrelic.yml +22 -0
  126. data/test/multiverse/suites/active_record/encoding_test.rb +26 -0
  127. data/test/multiverse/suites/agent_only/Envfile +4 -0
  128. data/test/multiverse/suites/agent_only/audit_log_test.rb +99 -0
  129. data/test/multiverse/suites/agent_only/config/newrelic.yml +22 -0
  130. data/test/multiverse/suites/agent_only/http_response_code_test.rb +53 -0
  131. data/test/multiverse/suites/agent_only/marshaling_test.rb +109 -0
  132. data/test/multiverse/suites/agent_only/method_visibility_test.rb +98 -0
  133. data/test/multiverse/suites/agent_only/pipe_manager_test.rb +33 -0
  134. data/test/multiverse/suites/agent_only/service_timeout_test.rb +29 -0
  135. data/test/multiverse/suites/agent_only/test_trace_method_with_punctuation.rb +30 -0
  136. data/test/multiverse/suites/agent_only/test_trace_transaction_with_punctuation.rb +32 -0
  137. data/test/multiverse/suites/agent_only/thread_profiling_test.rb +80 -0
  138. data/test/multiverse/suites/config_file_loading/Envfile +7 -0
  139. data/test/multiverse/suites/config_file_loading/config_file_loading_test.rb +106 -0
  140. data/test/multiverse/suites/datamapper/Envfile +8 -0
  141. data/test/multiverse/suites/datamapper/config/newrelic.yml +22 -0
  142. data/test/multiverse/suites/datamapper/encoding_test.rb +36 -0
  143. data/test/multiverse/suites/logging/Envfile +4 -0
  144. data/test/multiverse/suites/logging/config/newrelic.yml +22 -0
  145. data/test/multiverse/suites/logging/logging_test.rb +143 -0
  146. data/test/multiverse/suites/monitor_mode_false/Envfile +2 -0
  147. data/test/multiverse/suites/monitor_mode_false/config/newrelic.yml +25 -0
  148. data/test/multiverse/suites/monitor_mode_false/no_dns_resolv.rb +29 -0
  149. data/test/multiverse/suites/no_load/Envfile +2 -0
  150. data/test/multiverse/suites/no_load/config/newrelic.yml +22 -0
  151. data/test/multiverse/suites/no_load/start_up_test.rb +14 -0
  152. data/test/multiverse/suites/rails_3_error_tracing/Envfile +15 -0
  153. data/test/multiverse/suites/rails_3_error_tracing/config/newrelic.yml +165 -0
  154. data/test/multiverse/suites/rails_3_error_tracing/error_tracing_test.rb +236 -0
  155. data/test/multiverse/suites/rails_3_gc/Envfile +8 -0
  156. data/test/multiverse/suites/rails_3_gc/config/newrelic.yml +167 -0
  157. data/test/multiverse/suites/rails_3_gc/instrumentation_test.rb +92 -0
  158. data/test/multiverse/suites/rails_3_queue_time/Envfile +15 -0
  159. data/test/multiverse/suites/rails_3_queue_time/config/newrelic.yml +165 -0
  160. data/test/multiverse/suites/rails_3_queue_time/queue_time_test.rb +75 -0
  161. data/test/multiverse/suites/rails_3_views/.gitignore +3 -0
  162. data/test/multiverse/suites/rails_3_views/Envfile +16 -0
  163. data/test/multiverse/suites/rails_3_views/app/views/foos/_foo.html.haml +1 -0
  164. data/test/multiverse/suites/rails_3_views/app/views/test/_a_partial.html.erb +1 -0
  165. data/test/multiverse/suites/rails_3_views/app/views/test/_mid_partial.html.erb +1 -0
  166. data/test/multiverse/suites/rails_3_views/app/views/test/_top_partial.html.erb +3 -0
  167. data/test/multiverse/suites/rails_3_views/app/views/test/deep_partial.html.erb +3 -0
  168. data/test/multiverse/suites/rails_3_views/app/views/test/haml_view.html.haml +6 -0
  169. data/test/multiverse/suites/rails_3_views/app/views/test/index.html.erb +4 -0
  170. data/test/multiverse/suites/rails_3_views/config/newrelic.yml +164 -0
  171. data/test/multiverse/suites/rails_3_views/view_instrumentation_test.rb +245 -0
  172. data/test/multiverse/suites/resque/Envfile +21 -0
  173. data/test/multiverse/suites/resque/config/newrelic.yml +22 -0
  174. data/test/multiverse/suites/resque/dump.rdb +0 -0
  175. data/test/multiverse/suites/resque/instrumentation_test.rb +73 -0
  176. data/test/multiverse/suites/rum_auto_instrumentation/Envfile +4 -0
  177. data/test/multiverse/suites/rum_auto_instrumentation/config/newrelic.yml +24 -0
  178. data/test/multiverse/suites/rum_auto_instrumentation/responses/worst_case_small.html +5000 -0
  179. data/test/multiverse/suites/rum_auto_instrumentation/sanity_test.rb +102 -0
  180. data/test/multiverse/suites/sinatra/Envfile +13 -0
  181. data/test/multiverse/suites/sinatra/config/newrelic.yml +24 -0
  182. data/test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb +77 -0
  183. data/test/multiverse/suites/sinatra/sinatra_routes_test.rb +46 -0
  184. data/test/multiverse/suites/sinatra/sinatra_test.rb +55 -0
  185. data/test/multiverse/test/multiverse_test.rb +55 -0
  186. data/test/multiverse/test/suite_examples/one/a/Envfile +3 -0
  187. data/test/multiverse/test/suite_examples/one/a/a_test.rb +11 -0
  188. data/test/multiverse/test/suite_examples/one/a/config/newrelic.yml +24 -0
  189. data/test/multiverse/test/suite_examples/one/b/Envfile +3 -0
  190. data/test/multiverse/test/suite_examples/one/b/b_test.rb +11 -0
  191. data/test/multiverse/test/suite_examples/one/b/config/newrelic.yml +24 -0
  192. data/test/multiverse/test/suite_examples/three/a/Envfile +2 -0
  193. data/test/multiverse/test/suite_examples/three/a/fail_test.rb +6 -0
  194. data/test/multiverse/test/suite_examples/three/b/Envfile +2 -0
  195. data/test/multiverse/test/suite_examples/three/b/win_test.rb +6 -0
  196. data/test/multiverse/test/suite_examples/two/a/Envfile +1 -0
  197. data/test/multiverse/test/suite_examples/two/a/fail_test.rb +6 -0
  198. data/test/new_relic/agent/agent/connect_test.rb +151 -227
  199. data/test/new_relic/agent/agent/start_test.rb +68 -118
  200. data/test/new_relic/agent/agent/start_worker_thread_test.rb +12 -74
  201. data/test/new_relic/agent/agent_logger_test.rb +153 -0
  202. data/test/new_relic/agent/agent_test.rb +116 -30
  203. data/test/new_relic/agent/agent_test_controller.rb +1 -1
  204. data/test/new_relic/agent/agent_test_controller_test.rb +42 -10
  205. data/test/new_relic/agent/audit_logger_test.rb +105 -0
  206. data/test/new_relic/agent/beacon_configuration_test.rb +63 -67
  207. data/test/new_relic/agent/browser_monitoring_test.rb +151 -79
  208. data/test/new_relic/agent/busy_calculator_test.rb +7 -0
  209. data/test/new_relic/agent/configuration/environment_source_test.rb +79 -0
  210. data/test/new_relic/agent/configuration/manager_test.rb +204 -0
  211. data/test/new_relic/agent/configuration/server_source_test.rb +45 -0
  212. data/test/new_relic/agent/configuration/yaml_source_test.rb +75 -0
  213. data/test/new_relic/agent/cross_process_monitoring_test.rb +77 -0
  214. data/test/new_relic/agent/database_test.rb +12 -11
  215. data/test/new_relic/agent/error_collector/notice_error_test.rb +64 -53
  216. data/test/new_relic/agent/error_collector_test.rb +33 -19
  217. data/test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb +60 -30
  218. data/test/new_relic/agent/instrumentation/browser_monitoring_timings_test.rb +39 -0
  219. data/test/new_relic/agent/instrumentation/metric_frame/pop_test.rb +1 -1
  220. data/test/new_relic/agent/instrumentation/metric_frame_test.rb +6 -0
  221. data/test/new_relic/agent/instrumentation/queue_time_test.rb +14 -0
  222. data/test/new_relic/agent/instrumentation/sinatra_test.rb +25 -0
  223. data/test/new_relic/agent/instrumentation/task_instrumentation_test.rb +2 -2
  224. data/test/new_relic/agent/method_tracer/class_methods/add_method_tracer_test.rb +4 -10
  225. data/test/new_relic/agent/method_tracer/instance_methods/trace_execution_scoped_test.rb +3 -15
  226. data/test/new_relic/agent/method_tracer_test.rb +7 -6
  227. data/test/new_relic/agent/mock_scope_listener.rb +3 -0
  228. data/test/new_relic/agent/new_relic_service_test.rb +376 -0
  229. data/test/new_relic/agent/pipe_channel_manager_test.rb +131 -0
  230. data/test/new_relic/agent/pipe_service_test.rb +113 -0
  231. data/test/new_relic/agent/rpm_agent_test.rb +27 -50
  232. data/test/new_relic/agent/sql_sampler_test.rb +81 -56
  233. data/test/new_relic/agent/stats_engine/metric_stats/harvest_test.rb +3 -20
  234. data/test/new_relic/agent/stats_engine/metric_stats_test.rb +12 -1
  235. data/test/new_relic/agent/stats_engine_test.rb +17 -8
  236. data/test/new_relic/agent/thread_profiler_test.rb +537 -0
  237. data/test/new_relic/agent/thread_test.rb +89 -0
  238. data/test/new_relic/agent/threaded_test.rb +65 -0
  239. data/test/new_relic/agent/transaction_info_test.rb +45 -4
  240. data/test/new_relic/agent/transaction_sample_builder_test.rb +8 -7
  241. data/test/new_relic/agent/transaction_sampler_test.rb +193 -204
  242. data/test/new_relic/agent/worker_loop_test.rb +26 -11
  243. data/test/new_relic/agent_test.rb +113 -33
  244. data/test/new_relic/collection_helper_test.rb +7 -8
  245. data/test/new_relic/command/deployments_test.rb +18 -2
  246. data/test/new_relic/control/class_methods_test.rb +0 -18
  247. data/test/new_relic/control/frameworks/rails_test.rb +26 -0
  248. data/test/new_relic/control_test.rb +96 -137
  249. data/test/new_relic/delayed_job_injection_test.rb +6 -1
  250. data/test/new_relic/dispatcher_test.rb +54 -0
  251. data/test/new_relic/fake_collector.rb +283 -0
  252. data/test/new_relic/fake_service.rb +53 -0
  253. data/test/new_relic/fakes_sending_data.rb +30 -0
  254. data/test/new_relic/framework_test.rb +53 -0
  255. data/test/new_relic/load_test.rb +13 -0
  256. data/test/new_relic/local_environment_test.rb +11 -11
  257. data/test/new_relic/metric_data_test.rb +45 -16
  258. data/test/new_relic/noticed_error_test.rb +24 -0
  259. data/test/new_relic/rack/browser_monitoring_test.rb +20 -10
  260. data/test/new_relic/rack/developer_mode_test.rb +13 -7
  261. data/test/new_relic/rack/error_collector_test.rb +74 -0
  262. data/test/new_relic/stats_test.rb +10 -0
  263. data/test/new_relic/transaction_sample/segment_test.rb +23 -4
  264. data/test/new_relic/transaction_sample_test.rb +47 -2
  265. data/test/new_relic/version_number_test.rb +32 -0
  266. data/test/script/build_test_gem.sh +9 -3
  267. data/test/script/ci.sh +108 -35
  268. data/test/script/ci_agent-tests_runner.sh +82 -0
  269. data/test/script/ci_multiverse_runner.sh +63 -0
  270. data/test/test_contexts.rb +1 -0
  271. data/test/test_helper.rb +68 -18
  272. data/ui/helpers/developer_mode_helper.rb +21 -11
  273. data/ui/views/layouts/newrelic_default.rhtml +1 -0
  274. data/ui/views/newrelic/file/images/arrow-close.png +0 -0
  275. data/ui/views/newrelic/file/images/arrow-open.png +0 -0
  276. data/ui/views/newrelic/file/images/blue_bar.gif +0 -0
  277. data/ui/views/newrelic/file/images/file_icon.png +0 -0
  278. data/ui/views/newrelic/file/images/gray_bar.gif +0 -0
  279. data/ui/views/newrelic/show_sample.rhtml +1 -1
  280. data/ui/views/newrelic/threads.rhtml +2 -10
  281. data/vendor/gems/metric_parser-0.1.0.pre1/.specification +116 -0
  282. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_init.rb +7 -0
  283. metadata +191 -65
  284. data/lib/new_relic/agent/samplers/delayed_job_lock_sampler.rb +0 -40
  285. data/lib/new_relic/control/configuration.rb +0 -206
  286. data/lib/new_relic/control/logging_methods.rb +0 -143
  287. data/lib/new_relic/data_serialization.rb +0 -151
  288. data/test/new_relic/control/configuration_test.rb +0 -84
  289. data/test/new_relic/control/logging_methods_test.rb +0 -185
  290. data/test/new_relic/data_serialization_test.rb +0 -208
@@ -0,0 +1,76 @@
1
+ # Guidelines for Contributing Code
2
+
3
+ At New Relic we welcome community code contributions to the Ruby Agent, and have
4
+ taken effort to make this process easy for both contributors and our development
5
+ team.
6
+
7
+ When contributing keep in mind that the agent runs in a wide variety of ruby
8
+ language implementations (e.g. 1.8.6, 1.8.7, 1.9.x, jruby, etc.) as well as a
9
+ wide variety of application environments (e.g. rails, sinatra, roll-your-own,
10
+ etc., etc.)
11
+
12
+ Because of this we need to be more defensive in our coding practices than most
13
+ projects. Syntax must be compatible with all supported ruby implementations
14
+ (e.g. no 1.9 specific hash syntax) and we can't assume the presence of any
15
+ specific libraries such as `ActiveSupport`.
16
+
17
+ ## Testing
18
+
19
+ The agent includes a suite of unit and functional tests which should be used to
20
+ verify your changes don't break existing functionality.
21
+
22
+ Unit tests are stored in the `test/new_relic` directory.
23
+
24
+ Functional tests are stored in the `test/multiverse` directory.
25
+
26
+ ### Running Tests
27
+
28
+ Running the test suite is simple. Just invoke:
29
+
30
+ bundle
31
+ bundle exec rake
32
+
33
+ This will run the unit tests in standalone mode, bootstrapping a basic Rails
34
+ 3.2 environment for the agent to instrument then executing the test suite.
35
+
36
+ These tests are setup to run automatically in
37
+ [travis-ci](https://travis-ci.org/newrelic/rpm) under several Ruby implementations.
38
+ When you've pushed your changes to github you can confirm that the travis-ci
39
+ build passes for your fork of the codebase.
40
+
41
+ Additionally, our own CI jobs runs these tests under multiple versions of Rails to
42
+ verify compatibility.
43
+
44
+ ### Writing Tests
45
+
46
+ For most contributions it is strongly recommended to add additional tests which
47
+ exercise your changes.
48
+
49
+ This helps us efficiently incorporate your changes into our mainline codebase
50
+ and provides a safeguard that your change won't be broken by future development.
51
+
52
+ There are some rare cases where code changes do not result in changed
53
+ functionality (e.g. a performance optimization) and new tests are not required.
54
+ In general, including tests with your pull request dramatically increases the
55
+ chances it will be accepted.
56
+
57
+ ### Functional Testing
58
+
59
+ For cases where the unit test environment is not sufficient for testing a
60
+ change (e.g. instrumentation for a non-rails framework, not available in the
61
+ unit test environment), we have a functional testing suite called multiverse.
62
+ These tests can be run by invoking:
63
+
64
+ bundle
65
+ bundle exec rake test:multiverse
66
+
67
+ More details are available in
68
+ [test/multiverse/README.md](https://github.com/newrelic/rpm/blob/master/test/multiverse/README.md).
69
+
70
+ ### And Finally...
71
+
72
+ You are welcome to send pull requests to us - however, by doing so you agree
73
+ that you are granting New Relic a non-exclusive, non-revokable, no-cost license
74
+ to use the code, algorithms, patents, and ideas in that code in our products if
75
+ we so choose. You also agree the code is provided as-is and you provide no
76
+ warranties as to its fitness or correctness for any purpose.
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source :rubygems
2
+
3
+ group :development do
4
+ # require 0.9.2.2.
5
+ # There's problems with the test task in rake 10
6
+ # https://github.com/jimweirich/rake/issues/144
7
+ gem 'rake', '0.9.2.2'
8
+ gem 'mocha', '~>0.12.0'
9
+ gem 'shoulda', '~>3.0.1'
10
+ gem 'sdoc-helpers'
11
+ gem 'rdoc', '>= 2.4.2'
12
+ gem 'rails', '~>3.2.0'
13
+ gem 'sqlite3', :platform => 'mri'
14
+ gem 'activerecord-jdbcsqlite3-adapter', :platform => 'jruby'
15
+ gem 'jruby-openssl', :platform => 'jruby'
16
+ end
data/LICENSE CHANGED
@@ -25,7 +25,7 @@ See https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
25
25
 
26
26
 
27
27
  All other components of this product are
28
- Copyright (c) 2008-2011 New Relic, Inc. All rights reserved.
28
+ Copyright (c) 2008-2012 New Relic, Inc. All rights reserved.
29
29
 
30
30
  Certain inventions disclosed in this file may be claimed within
31
31
  patents owned or patent applications filed by New Relic, Inc. or third
@@ -1,30 +1,30 @@
1
- = New Relic Ruby Agent
1
+ # New Relic Ruby Agent
2
2
 
3
3
  New Relic is a performance management system, developed by
4
4
  New Relic, Inc (http://www.newrelic.com). It provides you with deep
5
5
  information about the performance of your Rails or Ruby
6
6
  application as it runs in production. The New Relic Ruby Agent is
7
7
  dual-purposed as a either a Rails plugin or a Gem, hosted on
8
- github[http://github.com/newrelic/rpm/tree/master].
8
+ [github](http://github.com/newrelic/rpm/tree/master).
9
9
 
10
10
  The New Relic Ruby Agent runs in one of two modes:
11
11
 
12
- ==== Production Mode
12
+ #### Production Mode
13
13
 
14
14
  Low overhead instrumentation that captures detailed information on
15
15
  your application running in production and transmits them to
16
16
  newrelic.com where you can monitor them in real time.
17
17
 
18
- ==== Developer Mode
18
+ #### Developer Mode
19
19
 
20
- A Rack middleware that maps /newrelic to an application for showing
20
+ A Rack middleware that maps `/newrelic` to an application for showing
21
21
  detailed performance metrics on a page by page basis. Installed
22
22
  automatically in Rails applications.
23
23
 
24
- == Supported Environments
24
+ ## Supported Environments
25
25
 
26
- * Ruby 1.8.7, 1.9.1, or 1.9.2, including REE
27
- * JRuby 1.4 or higher
26
+ * Ruby 1.8.6, 1.8.7, REE, 1.9.x
27
+ * JRuby 1.6 and 1.7
28
28
  * Rails 2.0 or later for Production Mode
29
29
  * Rails 2.3 or later for Developer Mode
30
30
  * Sinatra
@@ -37,27 +37,42 @@ desired. Report any problems to support@newrelic.com.
37
37
  You can also monitor non-web applications. Refer to the "Other
38
38
  Environments" section under "Getting Started".
39
39
 
40
- = Getting Started
40
+ ## Contributing Code
41
41
 
42
- Install the Ruby Agent as a gem. If you are using Rails you can
43
- install the gem as a plug-in--details below.
42
+ We welcome code contributions (in the form of pull requests) from our user
43
+ community. Before submitting a pull request please review
44
+ [GUIDELINES_FOR_CONTRIBUTING](https://github.com/newrelic/rpm/blob/master/GUIDELINES_FOR_CONTRIBUTING.md).
44
45
 
45
- gem install newrelic_rpm
46
+ Following these helps us efficiently review and incorporate your contribution
47
+ and avoid breaking your code with future changes to the agent.
48
+
49
+
50
+ ## Getting Started
51
+
52
+ Install the Ruby Agent as a gem.
53
+
54
+ gem install newrelic_rpm
55
+
56
+ Or add it to your project's Gemfile.
57
+
58
+ gem 'newrelic_rpm'
46
59
 
47
60
  To monitor your applications in production, create an account at
48
61
  http://newrelic.com/ . There you can
49
62
  sign up for a free Lite account or one of our paid subscriptions.
50
63
 
51
64
  Once you receive the welcome e-mail with a license key and
52
- +newrelic.yml+ file, copy the +newrelic.yml+ file into your app config
65
+ `newrelic.yml` file, copy the `newrelic.yml` file into your app config
53
66
  directory.
54
67
 
55
- All agent configuration is done in the +newrelic.yml+ file. This file
56
- is by default read from the +config+ directory of the application root
68
+ The initial configuration is done in the `newrelic.yml` file. This file
69
+ is by default read from the `config` directory of the application root
57
70
  and is subsequently searched for in the application root directory,
58
- and then in a <tt>~/.newrelic</tt> directory
71
+ and then in a `~/.newrelic` directory. Once you're up and running you can
72
+ enable Server Side Config and manage your newrelic configuation from the web
73
+ UI.
59
74
 
60
- === Rails Installation
75
+ #### Rails Installation
61
76
 
62
77
  You can install the agent as a Gem:
63
78
 
@@ -68,88 +83,87 @@ Add the following line to your Gemfile:
68
83
  gem 'newrelic_rpm'
69
84
 
70
85
  For Rails 2.x without Bundler:
71
-
72
- edit +environment.rb+ and add to the initalizer block:
73
-
74
- config.gem "newrelic_rpm"
75
-
76
- === Merb Installation
77
86
 
78
- To monitor a merb app install the newrelic_rpm gem and add
87
+ edit `environment.rb` and add to the initalizer block:
79
88
 
80
- dependency 'newrelic_rpm'
89
+ config.gem "newrelic_rpm"
81
90
 
82
- to your init.rb file.
83
-
84
- === Sinatra Installation
91
+ #### Sinatra Installation
85
92
 
86
93
  To use the Ruby Agent with a Sinatra app, add
94
+
87
95
  require 'newrelic_rpm'
96
+
88
97
  in your Sinatra app, below the Sinatra require directive.
89
98
 
90
- Then make sure you set RACK_ENV to the environment corresponding to the
91
- configuration definitions in the newrelic.yml file; i.e., development,
99
+ Then make sure you set `RACK_ENV` to the environment corresponding to the
100
+ configuration definitions in the newrelic.yml file; e.g., development,
92
101
  staging, production, etc.
93
102
 
94
- To use Developer Mode in Sinatra, add NewRelic::Rack::DeveloperMode to
95
- the middleware stack. See the +config.ru+ sample below.
103
+ To use Developer Mode in Sinatra, add `NewRelic::Rack::DeveloperMode` to
104
+ the middleware stack. See the `config.ru` sample below.
105
+
106
+ #### Other Environments
96
107
 
97
- === Other Environments
108
+ You can use the Ruby Agent to monitor any Ruby application. Add
98
109
 
99
- You can use the Ruby Agent to monitor any Ruby application. Add
100
110
  require 'newrelic_rpm'
111
+
101
112
  to your startup sequence and then manually start the agent using
113
+
102
114
  NewRelic::Agent.manual_start
103
115
 
104
116
  To instrument Rack based applications, refer to the docs in
105
- NewRelic::Agent::Instrumentation::Rack.
117
+ `NewRelic::Agent::Instrumentation::Rack`.
106
118
 
107
- Refer to the docs in New Relic for details on how to monitor other web
108
- frameworks, background jobs, and daemons.
119
+ Refer to the [New Relic's Docs](http://newrelic.com/docs) for details on how to
120
+ monitor other web frameworks, background jobs, and daemons.
109
121
 
110
- Also, see if your environment is already supported by the
111
- rpm_contrib[http://newrelic.github.com/rpm_contrib] gem.
122
+ The Ruby Agent provides an API that allows custom instrumentation of additional
123
+ frameworks. You can find a list of community created intrumentation plugins
124
+ (e.g. [newrelic-redis](https://github.com/evanphx/newrelic-redis)) in the
125
+ [RPM Contrib README](https://github.com/newrelic/rpm_contrib/blob/master/README.md#new-relic-ruby-agent-plugins-seperate-projects).
112
126
 
113
- == Developer Mode
127
+ ## Developer Mode
114
128
 
115
129
  When running the Developer Mode, the Ruby Agent will track the
116
130
  performance of every HTTP request serviced by your application, and
117
131
  store in memory this information for the last 100 HTTP transactions.
118
132
 
119
133
  To view this performance information, including detailed SQL statement
120
- analysis, open +/newrelic+ in your web application. For instance if
134
+ analysis, open `/newrelic` in your web application. For instance if
121
135
  you are running mongrel or thin on port 3000, enter the following into
122
136
  your browser:
123
137
 
124
138
  http://localhost:3000/newrelic
125
139
 
126
- Developer Mode is only initialized if the +developer_mode+ setting in
140
+ Developer Mode is only initialized if the `developer_mode` setting in
127
141
  the newrelic.yml file is set to true. By default, it is turned off in
128
- all environments but +development+.
142
+ all environments but `development`.
129
143
 
130
- ==== Developer Mode in Rails
144
+ #### Developer Mode in Rails
131
145
 
132
146
  Developer Mode is available automatically in Rails Applications based
133
147
  on Rails 2.3 and later. No additional configuration is required. When
134
- your application starts and +developer_mode+ is enabled, the Ruby
148
+ your application starts and `developer_mode` is enabled, the Ruby
135
149
  Agent injects a middleware into your Rails middleware stack.
136
150
 
137
151
  For earlier versions of Rails that support Rack, you can use
138
- a +config.ru+ as below.
152
+ a `config.ru` as below.
139
153
 
140
- ==== Developer Mode in Rack Applications
154
+ #### Developer Mode in Rack Applications
141
155
 
142
156
  Developer Mode is available for any Rack based application such as
143
157
  Sinatra by installing the NewRelic::Rack::DeveloperMode
144
158
  middleware. This middleware passes all requests that do not start with
145
159
  /newrelic.
146
160
 
147
- Here's an example entry for Developer Mode in a +config.ru+ file:
161
+ Here's an example entry for Developer Mode in a `config.ru` file:
148
162
 
149
163
  require 'new_relic/rack/developer_mode'
150
164
  use NewRelic::Rack::DeveloperMode
151
165
 
152
- == Production Mode
166
+ ## Production Mode
153
167
 
154
168
  When your application runs in the production environment, the New
155
169
  Relic agent runs in production mode. It connects to the New Relic
@@ -157,13 +171,13 @@ service and sends deep performance data to the UI for your
157
171
  analysis. To view this data, log in to http://rpm.newrelic.com.
158
172
 
159
173
  NOTE: You must have a valid account and license key to view this data
160
- online. Refer to instructions in *Getting Started*, below.
174
+ online. Refer to instructions in *Getting Started*.
161
175
 
162
176
 
163
- = Support
177
+ ## Support
164
178
 
165
179
  Reach out to us--and to fellow users--at
166
- support.newrelic.com[http://support.newrelic.com/].
180
+ [support.newrelic.com](http://support.newrelic.com/).
167
181
  There you'll find documentation, FAQs, and forums where you can submit
168
182
  suggestions and discuss New Relic with staff and other users.
169
183
 
@@ -171,9 +185,11 @@ Also available is community support on IRC: we generally use #newrelic
171
185
  on irc.freenode.net
172
186
 
173
187
  Find a bug? E-mail support@newrelic.com, or post it to
174
- support.newrelic.com[http://support.newrelic.com/].
175
188
 
176
- Thank you, and may your application scale to infinity plus one.
189
+ [support.newrelic.com](http://support.newrelic.com/).
190
+
191
+ Thank you, and may your application scale to infinity plus one.
192
+
193
+ Lew Cirne, Founder and CEO
177
194
 
178
- Lew Cirne, Founder and CEO<br/>
179
195
  New Relic, Inc.
data/Rakefile ADDED
@@ -0,0 +1,62 @@
1
+ require 'rubygems'
2
+ require 'rake/testtask'
3
+ require "#{File.dirname(__FILE__)}/lib/new_relic/version.rb"
4
+ require "#{File.dirname(__FILE__)}/lib/tasks/all.rb"
5
+
6
+ task :default => :test
7
+
8
+ task :test => [:gemspec, 'test:newrelic']
9
+
10
+ namespace :test do
11
+ desc "Run all tests"
12
+ task :all => %w{newrelic multiverse}
13
+
14
+ agent_home = File.expand_path(File.dirname(__FILE__))
15
+
16
+ desc "Run functional test suite for newrelic"
17
+ task :multiverse, [:suite, :mode] => [:gemspec] do |t, args|
18
+ args.with_defaults(:suite => "", :mode => "")
19
+ if args.mode == "run_one"
20
+ puts `#{agent_home}/test/multiverse/script/run_one #{args.suite}`
21
+ else
22
+ ruby "#{agent_home}/test/multiverse/script/runner #{args.suite}"
23
+ end
24
+ end
25
+
26
+ desc "Test the multiverse testing framework by executing tests in test/multiverse/test. Get meta with it."
27
+ task 'multiverse:self', [:suite, :mode] => [:gemspec] do |t, args|
28
+ args.with_defaults(:suite => "", :mode => "")
29
+ puts ("Testing the multiverse testing framework...")
30
+ test_files = FileList['test/multiverse/test/*_test.rb']
31
+ ruby test_files.join(" ")
32
+ end
33
+
34
+ Rake::TestTask.new(:intentional_fail) do |t|
35
+ t.libs << "#{agent_home}/test"
36
+ t.libs << "#{agent_home}/lib"
37
+ t.pattern = "#{agent_home}/test/intentional_fail.rb"
38
+ t.verbose = true
39
+ end
40
+
41
+ # Note unit testing task is defined in lib/tasks/tests.rake to facilitate
42
+ # running them in a rails application environment.
43
+
44
+ end
45
+
46
+ desc 'Generate gemspec [ build_number, stage ]'
47
+ task :gemspec, [ :build_number, :stage ] do |t, args|
48
+ require 'erb'
49
+ version = NewRelic::VERSION::STRING.split('.')[0..2]
50
+ version << args.build_number.to_s if args.build_number
51
+ version << args.stage.to_s if args.stage
52
+
53
+ version_string = version.join('.')
54
+ gem_version = Gem::VERSION
55
+ date = Time.now.strftime('%Y-%m-%d')
56
+ files = `git ls-files`.split + ['newrelic_rpm.gemspec']
57
+
58
+ template = ERB.new(File.read('newrelic_rpm.gemspec.erb'))
59
+ File.open('newrelic_rpm.gemspec', 'w') do |gemspec|
60
+ gemspec.write(template.result(binding))
61
+ end
62
+ end
data/bin/mongrel_rpm CHANGED
@@ -28,6 +28,6 @@ builder = Rack::Builder.new { eval rackup_code, binding, ru_file }
28
28
 
29
29
  options = { :Host => '127.0.0.1', :Port => port }
30
30
  Rack::Handler::Mongrel.run(builder.to_app, options) do | server |
31
- NewRelic::Control.instance.log! "Started Mongrel listening for '#{NewRelic::Control.instance.app_names.join(" and ")}' data at #{server.host}:#{server.port}"
31
+ NewRelic::Agent.logger.info "Started Mongrel listening for '#{NewRelic::Control.instance.app_names.join(" and ")}' data at #{server.host}:#{server.port}"
32
32
  end
33
33
 
data/config.dot ADDED
@@ -0,0 +1,290 @@
1
+ digraph AgentEnabled {
2
+ node[color=green]
3
+ "[agent_enabled]"
4
+ "[developer_mode]"
5
+ "[monitor_mode]"
6
+ "[slow_sql.explain_threshold]"
7
+ "[slow_sql.stack_trace_threshold]"
8
+ "[slow_sql.explain_enabled]"
9
+ "[slow_sql.enabled]"
10
+ "[slow_sql.record_sql]"
11
+ "[transaction_tracer.limit_segments]"
12
+ "[transaction_tracer.stack_trace_threshold]"
13
+ "[transaction_tracer.explain_threshold]"
14
+ "[transaction_tracer.explain_enabled]"
15
+ "[transaction_tracer.transaction_threshold]"
16
+ "[transaction_tracer.record_sql]"
17
+ "[transaction_tracer.random_sample]"
18
+ "[transaction_tracer.enabled]"
19
+ "[error_collector.capture_source]"
20
+ "[error_collector.enabled]"
21
+ "[error_collector.ignore_errors]"
22
+ "[browser_monitoring.auto_instrument]"
23
+ "[license_key]"
24
+ "[ssl]"
25
+ "[verify_certificate]"
26
+ "[api_host]"
27
+ "[api_port]"
28
+ "[proxy_host]"
29
+ "[proxy_port]"
30
+ "[proxy_user]"
31
+ "[proxy_pass]"
32
+ "[host]"
33
+ "[port]"
34
+ "[timeout]"
35
+ "[log_level]"
36
+ "[apdex_t]"
37
+ "[capture_params]"
38
+ "[app_name]"
39
+ "[multi_homed]"
40
+ "[disable_samplers]"
41
+ "[log_file_name]"
42
+ "[log_file_path]"
43
+ "[dispatcher]"
44
+ "[force_send]"
45
+ "[disable_mobile_headers]"
46
+ "[textmate]"
47
+ "[post_size_limit]"
48
+ "[sync_startup]"
49
+ "[send_data_on_exit]"
50
+ "[high_security]"
51
+ "[validate_seed]"
52
+ "[validate_token]"
53
+ "[disable_backtrace_cleanup]"
54
+ "[disable_activerecord_instrumentation]"
55
+ "[disable_dj]"
56
+ "[capture_memcache_keys]"
57
+ "[disable_memcache_instrumentation]"
58
+ "[disable_view_instrumentation]"
59
+ "[disable_resque]"
60
+
61
+ node[shape=box,color=orange]
62
+ "Control#init_plugin"
63
+ "Control#api_server"
64
+ "Control#proxy_server"
65
+ "Control#server_from_host"
66
+ "Control#http_connection"
67
+ "Control#set_log_level!"
68
+ "Control#log_path"
69
+ "Control#log_to_stdout?"
70
+ "Control#convert_to_ip_address"
71
+ "Control#server"
72
+ "Control#setup_log"
73
+ "Control#should_log?"
74
+ "Control#log!"
75
+
76
+ node[color=green]
77
+ "Config#app_names"
78
+
79
+ node[color=black]
80
+ "Agent#initialize"
81
+ "Agent#after_fork"
82
+ "Agent#disabled?"
83
+ "Agent#shutdown"
84
+ "Agent#using_forking_dispatcher?"
85
+ "Agent#has_license_key?"
86
+ "Agent#correct_license_length"
87
+ "Agent#apdex_f"
88
+ "Agent#check_config_and_start_agent"
89
+ "Agent#install_exit_handler"
90
+ "Agent#log_app_names"
91
+ "Agent#connect_settings"
92
+ "Agent#log_seed_token"
93
+ "Agent#log_error"
94
+ "Agent#monitoring?"
95
+ "Agent#check_trasaction_sampler_status"
96
+ "Agent#check_sql_sampler_status"
97
+ "Agent#config_transaction_tracer"
98
+ "Agent#set_sql_recording!"
99
+ "Agent#already_started?"
100
+ "Agent#log_connection"
101
+ "Agent#manual_start"
102
+
103
+ "MethodTracer#remove_method_tracer"
104
+
105
+ "ErrorCollector#initialize"
106
+ "ErrorCollector#request_params_from_opts"
107
+
108
+ "ControllerInstrumentation#perform_action_with_newrelic_trace"
109
+
110
+ "NewRelicService#initialize"
111
+ "NewRelicService#check_post_size"
112
+ "NewRelicService#connect"
113
+ "NewRelicService#send_request"
114
+
115
+ "SqlSampler#configure!"
116
+
117
+ "TransactionSampler#configure!"
118
+ "TransactionSampler#notice_push_scope"
119
+ "TransactionSampler#capture_segment_trace"
120
+ "TransactionSampler#store_segment_for_developer_mode"
121
+
122
+ "NoticedError#initialize"
123
+
124
+ "BeaconConfiguration#license_bytes"
125
+
126
+ "ActiveRecord#depends_on"
127
+ "DelayedJobInstrumentation#depends_on"
128
+ "Memcache#memcache_key_snippet"
129
+ "Memcache#depends_on"
130
+ "Rails::ActionController#depends_on"
131
+ "Rails3::ActionController#depends_on"
132
+ "Resque#depends_on"
133
+
134
+ "DelayedJobSampler#initialize"
135
+ "DelayedJobInjection#depends_on"
136
+
137
+ "MetricFrame.update_apdex"
138
+
139
+ "TranactionInfo#force_persist_sample?"
140
+ "TranactionInfo#include_guid?"
141
+
142
+ "TransactionSampleBuilder#initialize"
143
+ "TransactionSampleBuilder#set_transaction_info"
144
+
145
+ "Rails#install_browser_monitoring"
146
+ "Rails#log!"
147
+ "Rails3#log!"
148
+
149
+ "CollectionHelper#strip_nr_from_backtrace"
150
+
151
+ "Deployments#initialize"
152
+
153
+ #######
154
+
155
+ "Control#init_plugin" -> "[agent_enabled]"
156
+ "Control#init_plugin" -> "Control#setup_log"
157
+ "Control#init_plugin" -> "[disable_samplers]"
158
+ "Control#should_log?" -> "[agent_enabled]"
159
+ "Control#api_server" -> "[api_host]"
160
+ "Control#api_server" -> "[api_port]"
161
+ "Control#proxy_server" -> "[proxy_host]"
162
+ "Control#proxy_server" -> "[proxy_port]"
163
+ "Control#proxy_server" -> "[proxy_user]"
164
+ "Control#proxy_server" -> "[proxy_pass]"
165
+ "Control#server_from_host" -> "[host]"
166
+ "Control#server_from_host" -> "[port]"
167
+ "Control#server_from_host" -> "Control#convert_to_ip_address"
168
+ "Control#http_connection" -> "[ssl]"
169
+ "Control#http_connection" -> "[verify_certificate]"
170
+ "Control#http_connection" -> "Control#proxy_server"
171
+ "Control#set_log_level!" -> "[log_level]"
172
+ "Control#log_path" -> "[log_file_path]"
173
+ "Control#log_path" -> "Control#log_to_stdout?"
174
+ "Control#log_to_stdout?" -> "[log_file_path]"
175
+ "Control#convert_to_ip_address" -> "[ssl]"
176
+ "Control#convert_to_ip_address" -> "[verify_certificate]"
177
+ "Control#server" -> "Control#server_from_host"
178
+ "Control#setup_log" -> "Control#set_log_level!"
179
+ "Control#setup_log" -> "Control#log_path"
180
+ "Control#setup_log" -> "Control#log_to_stdout?"
181
+ "Control#setup_log" -> "[log_file_name]"
182
+ "Control#log!" -> "Control#should_log?"
183
+ "Control#log!" -> "Control#log_path"
184
+
185
+ "Agent#initialize" -> "[monitor_mode]"
186
+ "Agent#after_fork" -> "[agent_enabled]"
187
+ "Agent#after_fork" -> "[monitor_mode]"
188
+ "Agent#disabled?" -> "[agent_enabled]"
189
+ "Agent#shutdown" -> "[force_send]"
190
+ "Agent#shutdown" -> "[dispatcher]"
191
+ "Agent#using_forking_dispatcher?" -> "[dispatcher]"
192
+ "Agent#has_license_key?" -> "[license_key]"
193
+ "Agent#correct_license_length" -> "[license_key]"
194
+ "Agent#apdex_f" -> "[apdex_t]"
195
+ "Agent#check_config_and_start_agent" -> "[sync_startup]"
196
+ "Agent#install_exit_handler" -> "[send_data_on_exit]"
197
+ "Agent#log_app_names" -> "Config#app_names"
198
+ "Agent#connect_settings" -> "Config#app_names"
199
+ "Agent#log_seed_token" -> "[validate_seed]"
200
+ "Agent#log_seed_token" -> "[validate_token]"
201
+ "Agent#validate_settings" -> "[validate_seed]"
202
+ "Agent#validate_settings" -> "[validate_token]"
203
+ "Agent#log_error" -> "Control#server"
204
+ "Agent#monitoring?" -> "[monitor_mode]"
205
+ "Agent#check_trasaction_sampler_status" -> "[developer_mode]"
206
+ "Agent#check_sql_sampler_status" -> "[slow_sql.enabled]"
207
+ "Agent#check_sql_sampler_status" -> "[slow_sql.record_sql]"
208
+ "Agent#check_sql_sampler_status" -> "[transaction_tracer.enabled]"
209
+ "Agent#config_transaction_tracer" -> "[transaction_tracer.enabled]"
210
+ "Agent#config_transaction_tracer" -> "[transaction_tracer.random_sample]"
211
+ "Agent#config_transaction_tracer" -> "[transaction_tracer.transaction_threshold]"
212
+ "Agent#set_sql_recording!" -> "[transaction_tracer.record_sql]"
213
+ "Agent#already_started?" -> "Control#log!"
214
+ "Agent#log_connection" -> "Control#log!"
215
+ "Agent#manual_start" -> "Control#init_plugin"
216
+
217
+ "MethodTracer#remove_method_tracer" -> "[agent_enabled]"
218
+
219
+ "Rails#init_config" -> "[agent_enabled]"
220
+ "Rails#init_config" -> "[developer_mode]"
221
+
222
+ "ErrorCollector#initialize" -> "[error_collector.enabled]"
223
+ "ErrorCollector#initialize" -> "[error_collector.capture_source]"
224
+ "ErrorCollector#initialize" -> "[error_collector.ignore_errors]"
225
+ "ErrorCollector#request_params_from_opts" -> "[capture_params]"
226
+
227
+ "ControllerInstrumentation#perform_action_with_newrelic_trace" -> "[disable_mobile_headers]"
228
+
229
+ "NewRelicService#initialize" -> "[timeout]"
230
+ "NewRelicService#initialize" -> "[license_key]"
231
+ "NewRelicService#initialize" -> "Control#server"
232
+ "NewRelicService#check_post_size" -> "[post_size_limit]"
233
+ "NewRelicService#connect" -> "Control#server_from_host"
234
+ "NewRelicService#send_request" -> "Control#http_connection"
235
+
236
+ "SqlSampler#configure!" -> "[slow_sql.explain_threshold]"
237
+ "SqlSampler#configure!" -> "[slow_sql.explain_enabled]"
238
+ "SqlSampler#configure!" -> "[slow_sql.stack_trace_threshold]"
239
+ "SqlSampler#configure!" -> "[slow_sql.enabled]"
240
+
241
+ "TransactionSampler#configure!" -> "[transaction_tracer.limit_segments]"
242
+ "TransactionSampler#configure!" -> "[transaction_tracer.stack_trace_threshold]"
243
+ "TransactionSampler#configure!" -> "[transaction_tracer.explain_threshold]"
244
+ "TransactionSampler#configure!" -> "[transaction_tracer.explain_enabled]"
245
+ "TransactionSampler#configure!" -> "[transaction_tracer.transaction_threshold]"
246
+ "TransactionSampler#configure!" -> "[developer_mode]"
247
+ "TransactionSampler#notice_push_scope" -> "[developer_mode]"
248
+ "TransactionSampler#capture_segment_trace" -> "[developer_mode]"
249
+ "TransactionSampler#store_segment_for_developer_mode" -> "[developer_mode]"
250
+
251
+ "NoticedError#initialize" -> "[high_security]"
252
+
253
+ "BeaconConfiguration#license_bytes" -> "[license_key]"
254
+
255
+ "ActiveRecord#depends_on" -> "[disable_activerecord_instrumentation]"
256
+
257
+ "DelayedJobInstrumentation#depends_on" -> "[disable_dj]"
258
+
259
+ "Memcache#memcache_key_snippet" -> "[capture_memcache_keys]"
260
+ "Memcache#depends_on" -> "[disable_memcache_instrumentation]"
261
+
262
+ "Rails::ActionController#depends_on" -> "[disable_view_instrumentation]"
263
+ "Rails3::ActionController#depends_on" -> "[disable_view_instrumentation]"
264
+ "Resque#depends_on" -> "[disable_resque]"
265
+
266
+ "DelayedJobSampler#initialize" -> "[disable_dj]"
267
+ "DelayedJobInjection#depends_on" -> "[disable_dj]"
268
+ "DelayedJobInjection#executes" -> "Control#init_plugin"
269
+
270
+ "MetricFrame.update_apdex" -> "[apdex_t]"
271
+
272
+ "TranactionInfo#force_persist_sample?" -> "[apdex_t]"
273
+ "TranactionInfo#include_guid?" -> "[apdex_t]"
274
+
275
+ "TransactionSampleBuilder#initialize" -> "[transaction_tracer.limit_segments]"
276
+ "TransactionSampleBuilder#set_transaction_info" -> "[capture_params]"
277
+
278
+ "Rails#install_browser_monitoring" -> "[browser_monitoring.auto_instrument]"
279
+ "Rails#log!" -> "Control#should_log?"
280
+ "Rails3#log!" -> "Control#should_log?"
281
+
282
+ "CollectionHelper#strip_nr_from_backtrace" -> "[disable_backtrace_cleanup]"
283
+
284
+ "Deployments#initialize" -> "Config#app_names"
285
+ "Deployments#run" -> "Control#http_connection"
286
+ "Deployments#run" -> "[license_key]"
287
+ "Deployments#run" -> "Control#api_server"
288
+
289
+ "Config#app_names" -> "[app_name]"
290
+ }