newrelic_rpm 3.5.8.72 → 3.6.0.74.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (333) hide show
  1. data/.travis.yml +1 -0
  2. data/CHANGELOG +16 -0
  3. data/LICENSE +70 -6
  4. data/init.rb +4 -0
  5. data/install.rb +4 -0
  6. data/lib/conditional_vendored_dependency_detection.rb +4 -0
  7. data/lib/conditional_vendored_metric_parser.rb +4 -0
  8. data/lib/new_relic/agent/agent.rb +10 -7
  9. data/lib/new_relic/agent/agent_logger.rb +4 -0
  10. data/lib/new_relic/agent/audit_logger.rb +4 -0
  11. data/lib/new_relic/agent/beacon_configuration.rb +4 -0
  12. data/lib/new_relic/agent/browser_monitoring.rb +4 -0
  13. data/lib/new_relic/agent/busy_calculator.rb +7 -6
  14. data/lib/new_relic/agent/chained_call.rb +4 -0
  15. data/lib/new_relic/agent/configuration/defaults.rb +4 -0
  16. data/lib/new_relic/agent/configuration/environment_source.rb +4 -0
  17. data/lib/new_relic/agent/configuration/manager.rb +4 -0
  18. data/lib/new_relic/agent/configuration/mask_defaults.rb +4 -0
  19. data/lib/new_relic/agent/configuration/server_source.rb +4 -0
  20. data/lib/new_relic/agent/configuration/yaml_source.rb +5 -1
  21. data/lib/new_relic/agent/configuration.rb +4 -0
  22. data/lib/new_relic/agent/cross_app_monitor.rb +9 -10
  23. data/lib/new_relic/agent/cross_app_tracing.rb +6 -18
  24. data/lib/new_relic/agent/database.rb +4 -0
  25. data/lib/new_relic/agent/error_collector.rb +23 -10
  26. data/lib/new_relic/agent/event_listener.rb +4 -0
  27. data/lib/new_relic/agent/instrumentation/active_merchant.rb +4 -0
  28. data/lib/new_relic/agent/instrumentation/active_record.rb +4 -0
  29. data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +4 -0
  30. data/lib/new_relic/agent/instrumentation/authlogic.rb +4 -0
  31. data/lib/new_relic/agent/instrumentation/browser_monitoring_timings.rb +4 -0
  32. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +5 -8
  33. data/lib/new_relic/agent/instrumentation/data_mapper.rb +5 -1
  34. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +4 -0
  35. data/lib/new_relic/agent/instrumentation/memcache.rb +4 -0
  36. data/lib/new_relic/agent/instrumentation/merb/controller.rb +4 -0
  37. data/lib/new_relic/agent/instrumentation/merb/errors.rb +4 -0
  38. data/lib/new_relic/agent/instrumentation/metric_frame/pop.rb +5 -1
  39. data/lib/new_relic/agent/instrumentation/metric_frame.rb +15 -18
  40. data/lib/new_relic/agent/instrumentation/net.rb +4 -2
  41. data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +4 -0
  42. data/lib/new_relic/agent/instrumentation/queue_time.rb +6 -2
  43. data/lib/new_relic/agent/instrumentation/rack.rb +4 -0
  44. data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +4 -0
  45. data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +4 -0
  46. data/lib/new_relic/agent/instrumentation/rails/errors.rb +4 -0
  47. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +4 -0
  48. data/lib/new_relic/agent/instrumentation/rails3/errors.rb +4 -0
  49. data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +26 -0
  50. data/lib/new_relic/agent/instrumentation/resque.rb +4 -0
  51. data/lib/new_relic/agent/instrumentation/sidekiq.rb +36 -0
  52. data/lib/new_relic/agent/instrumentation/sinatra.rb +4 -0
  53. data/lib/new_relic/agent/instrumentation/sunspot.rb +4 -0
  54. data/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb +4 -0
  55. data/lib/new_relic/agent/instrumentation.rb +4 -0
  56. data/lib/new_relic/agent/method_tracer.rb +26 -31
  57. data/lib/new_relic/agent/new_relic_service.rb +7 -6
  58. data/lib/new_relic/agent/pipe_channel_manager.rb +58 -15
  59. data/lib/new_relic/agent/pipe_service.rb +13 -6
  60. data/lib/new_relic/agent/rules_engine.rb +4 -0
  61. data/lib/new_relic/agent/sampler.rb +4 -0
  62. data/lib/new_relic/agent/samplers/cpu_sampler.rb +20 -12
  63. data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +15 -12
  64. data/lib/new_relic/agent/samplers/memory_sampler.rb +9 -5
  65. data/lib/new_relic/agent/samplers/object_sampler.rb +6 -6
  66. data/lib/new_relic/agent/shim_agent.rb +4 -0
  67. data/lib/new_relic/agent/sql_sampler.rb +4 -0
  68. data/lib/new_relic/agent/stats.rb +3 -0
  69. data/lib/new_relic/agent/stats_engine/gc_profiler.rb +8 -4
  70. data/lib/new_relic/agent/stats_engine/metric_stats.rb +13 -13
  71. data/lib/new_relic/agent/stats_engine/samplers.rb +6 -3
  72. data/lib/new_relic/agent/stats_engine/stats_hash.rb +4 -0
  73. data/lib/new_relic/agent/stats_engine/transactions.rb +4 -0
  74. data/lib/new_relic/agent/stats_engine.rb +4 -0
  75. data/lib/new_relic/agent/thread.rb +4 -0
  76. data/lib/new_relic/agent/thread_profiler.rb +4 -0
  77. data/lib/new_relic/agent/transaction_info.rb +4 -0
  78. data/lib/new_relic/agent/transaction_sample_builder.rb +4 -0
  79. data/lib/new_relic/agent/transaction_sampler.rb +4 -0
  80. data/lib/new_relic/agent/worker_loop.rb +4 -0
  81. data/lib/new_relic/agent.rb +7 -3
  82. data/lib/new_relic/build.rb +2 -2
  83. data/lib/new_relic/coerce.rb +4 -0
  84. data/lib/new_relic/collection_helper.rb +4 -0
  85. data/lib/new_relic/command.rb +4 -0
  86. data/lib/new_relic/commands/deployments.rb +4 -0
  87. data/lib/new_relic/commands/install.rb +4 -0
  88. data/lib/new_relic/control/class_methods.rb +4 -0
  89. data/lib/new_relic/control/frameworks/external.rb +4 -0
  90. data/lib/new_relic/control/frameworks/merb.rb +4 -0
  91. data/lib/new_relic/control/frameworks/rails.rb +4 -0
  92. data/lib/new_relic/control/frameworks/rails3.rb +4 -0
  93. data/lib/new_relic/control/frameworks/rails4.rb +4 -0
  94. data/lib/new_relic/control/frameworks/ruby.rb +4 -0
  95. data/lib/new_relic/control/frameworks/sinatra.rb +4 -0
  96. data/lib/new_relic/control/frameworks.rb +4 -0
  97. data/lib/new_relic/control/instance_methods.rb +4 -0
  98. data/lib/new_relic/control/instrumentation.rb +4 -0
  99. data/lib/new_relic/control/profiling.rb +4 -0
  100. data/lib/new_relic/control/server_methods.rb +4 -0
  101. data/lib/new_relic/control.rb +4 -0
  102. data/lib/new_relic/delayed_job_injection.rb +4 -0
  103. data/lib/new_relic/helper.rb +4 -1
  104. data/lib/new_relic/language_support.rb +4 -0
  105. data/lib/new_relic/latest_changes.rb +5 -1
  106. data/lib/new_relic/local_environment.rb +18 -1
  107. data/lib/new_relic/merbtasks.rb +4 -0
  108. data/lib/new_relic/metric_data.rb +4 -0
  109. data/lib/new_relic/metric_spec.rb +4 -0
  110. data/lib/new_relic/metrics.rb +4 -0
  111. data/lib/new_relic/noticed_error.rb +4 -0
  112. data/lib/new_relic/okjson.rb +4 -1
  113. data/lib/new_relic/rack/agent_hooks.rb +4 -0
  114. data/lib/new_relic/rack/browser_monitoring.rb +4 -0
  115. data/lib/new_relic/rack/developer_mode.rb +4 -0
  116. data/lib/new_relic/rack/error_collector.rb +4 -0
  117. data/lib/new_relic/rack.rb +4 -0
  118. data/lib/new_relic/recipes.rb +4 -0
  119. data/lib/new_relic/timer_lib.rb +4 -0
  120. data/lib/new_relic/transaction_analysis/segment_summary.rb +4 -0
  121. data/lib/new_relic/transaction_analysis.rb +4 -0
  122. data/lib/new_relic/transaction_sample/composite_segment.rb +4 -0
  123. data/lib/new_relic/transaction_sample/fake_segment.rb +4 -0
  124. data/lib/new_relic/transaction_sample/segment.rb +4 -0
  125. data/lib/new_relic/transaction_sample/summary_segment.rb +4 -0
  126. data/lib/new_relic/transaction_sample.rb +4 -0
  127. data/lib/new_relic/url_rule.rb +4 -0
  128. data/lib/new_relic/version.rb +6 -2
  129. data/lib/newrelic_rpm.rb +4 -0
  130. data/lib/tasks/all.rb +4 -0
  131. data/recipes/newrelic.rb +4 -0
  132. data/test/active_record_fixtures.rb +4 -0
  133. data/test/config/test_control.rb +4 -0
  134. data/test/intentional_fail.rb +4 -0
  135. data/test/multiverse/lib/multiverse/color.rb +4 -0
  136. data/test/multiverse/lib/multiverse/envfile.rb +4 -0
  137. data/test/multiverse/lib/multiverse/environment.rb +4 -0
  138. data/test/multiverse/lib/multiverse/output_collector.rb +4 -0
  139. data/test/multiverse/lib/multiverse/runner.rb +4 -0
  140. data/test/multiverse/lib/multiverse/suite.rb +4 -0
  141. data/test/multiverse/suites/active_record/ar_method_aliasing.rb +4 -0
  142. data/test/multiverse/suites/active_record/encoding_test.rb +4 -0
  143. data/test/multiverse/suites/agent_only/audit_log_test.rb +4 -0
  144. data/test/multiverse/suites/agent_only/cross_application_tracing_test.rb +4 -0
  145. data/test/multiverse/suites/agent_only/http_response_code_test.rb +4 -0
  146. data/test/multiverse/suites/agent_only/key_transactions_test.rb +4 -0
  147. data/test/multiverse/suites/agent_only/logging_test.rb +4 -0
  148. data/test/multiverse/suites/agent_only/marshaling_test.rb +4 -0
  149. data/test/multiverse/suites/agent_only/method_visibility_test.rb +4 -0
  150. data/test/multiverse/suites/agent_only/no_dns_resolv.rb +4 -0
  151. data/test/multiverse/suites/agent_only/pipe_manager_test.rb +4 -0
  152. data/test/multiverse/suites/agent_only/rename_rule_test.rb +4 -0
  153. data/test/multiverse/suites/agent_only/rum_instrumentation_test.rb +4 -0
  154. data/test/multiverse/suites/agent_only/service_timeout_test.rb +4 -0
  155. data/test/multiverse/suites/agent_only/ssl_test.rb +4 -0
  156. data/test/multiverse/suites/agent_only/start_up_test.rb +4 -0
  157. data/test/multiverse/suites/agent_only/test_trace_method_with_punctuation.rb +4 -0
  158. data/test/multiverse/suites/agent_only/test_trace_transaction_with_punctuation.rb +4 -0
  159. data/test/multiverse/suites/agent_only/testing_app.rb +4 -0
  160. data/test/multiverse/suites/agent_only/thread_profiling_test.rb +4 -0
  161. data/test/multiverse/suites/config_file_loading/config_file_loading_test.rb +4 -0
  162. data/test/multiverse/suites/datamapper/encoding_test.rb +4 -0
  163. data/test/multiverse/suites/rails/app.rb +4 -0
  164. data/test/multiverse/suites/rails/error_tracing_test.rb +4 -0
  165. data/test/multiverse/suites/rails/gc_instrumentation_test.rb +4 -0
  166. data/test/multiverse/suites/rails/queue_time_test.rb +4 -0
  167. data/test/multiverse/suites/rails/view_instrumentation_test.rb +4 -0
  168. data/test/multiverse/suites/resque/instrumentation_test.rb +5 -1
  169. data/test/multiverse/suites/resque/resque_setup.rb +4 -0
  170. data/test/multiverse/suites/sidekiq/Envfile +21 -0
  171. data/test/multiverse/suites/sidekiq/app.rb +25 -0
  172. data/test/multiverse/suites/sidekiq/config/newrelic.yml +22 -0
  173. data/test/multiverse/suites/sidekiq/log/.gitkeep +0 -0
  174. data/test/multiverse/suites/sidekiq/sidekiq_instrumentation_test.rb +137 -0
  175. data/test/multiverse/suites/sinatra/sinatra_error_tracing_test.rb +4 -0
  176. data/test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb +4 -0
  177. data/test/multiverse/suites/sinatra/sinatra_routes_test.rb +4 -0
  178. data/test/multiverse/suites/sinatra/sinatra_test.rb +4 -0
  179. data/test/multiverse/test/multiverse_test.rb +4 -0
  180. data/test/multiverse/test/suite_examples/one/a/a_test.rb +4 -0
  181. data/test/multiverse/test/suite_examples/one/b/b_test.rb +4 -0
  182. data/test/multiverse/test/suite_examples/three/a/fail_test.rb +4 -0
  183. data/test/multiverse/test/suite_examples/three/b/win_test.rb +4 -0
  184. data/test/multiverse/test/suite_examples/two/a/fail_test.rb +4 -0
  185. data/test/new_relic/agent/agent/connect_test.rb +4 -0
  186. data/test/new_relic/agent/agent/start_test.rb +4 -0
  187. data/test/new_relic/agent/agent/start_worker_thread_test.rb +4 -0
  188. data/test/new_relic/agent/agent_logger_test.rb +4 -0
  189. data/test/new_relic/agent/agent_test.rb +6 -1
  190. data/test/new_relic/agent/agent_test_controller.rb +4 -0
  191. data/test/new_relic/agent/agent_test_controller_test.rb +4 -0
  192. data/test/new_relic/agent/apdex_from_server_test.rb +4 -0
  193. data/test/new_relic/agent/audit_logger_test.rb +4 -0
  194. data/test/new_relic/agent/beacon_configuration_test.rb +4 -0
  195. data/test/new_relic/agent/browser_monitoring_test.rb +4 -0
  196. data/test/new_relic/agent/busy_calculator_test.rb +6 -2
  197. data/test/new_relic/agent/configuration/environment_source_test.rb +4 -0
  198. data/test/new_relic/agent/configuration/manager_test.rb +4 -0
  199. data/test/new_relic/agent/configuration/server_source_test.rb +4 -0
  200. data/test/new_relic/agent/configuration/yaml_source_test.rb +4 -0
  201. data/test/new_relic/agent/cross_app_monitor_test.rb +12 -8
  202. data/test/new_relic/agent/database_test.rb +4 -0
  203. data/test/new_relic/agent/error_collector/notice_error_test.rb +4 -0
  204. data/test/new_relic/agent/error_collector_test.rb +4 -0
  205. data/test/new_relic/agent/event_listener_test.rb +4 -0
  206. data/test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb +4 -0
  207. data/test/new_relic/agent/instrumentation/browser_monitoring_timings_test.rb +4 -0
  208. data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +4 -0
  209. data/test/new_relic/agent/instrumentation/instrumentation_test.rb +4 -0
  210. data/test/new_relic/agent/instrumentation/metric_frame/pop_test.rb +4 -0
  211. data/test/new_relic/agent/instrumentation/metric_frame_test.rb +4 -0
  212. data/test/new_relic/agent/instrumentation/net_instrumentation_test.rb +3 -0
  213. data/test/new_relic/agent/instrumentation/queue_time_test.rb +4 -0
  214. data/test/new_relic/agent/instrumentation/rack_test.rb +4 -0
  215. data/test/new_relic/agent/instrumentation/sinatra_test.rb +4 -0
  216. data/test/new_relic/agent/instrumentation/task_instrumentation_test.rb +4 -0
  217. data/test/new_relic/agent/memcache_instrumentation_test.rb +4 -0
  218. data/test/new_relic/agent/method_tracer/class_methods/add_method_tracer_test.rb +4 -0
  219. data/test/new_relic/agent/method_tracer/instance_methods/trace_execution_scoped_test.rb +48 -26
  220. data/test/new_relic/agent/method_tracer_test.rb +4 -0
  221. data/test/new_relic/agent/mock_scope_listener.rb +4 -0
  222. data/test/new_relic/agent/new_relic_service_test.rb +4 -0
  223. data/test/new_relic/agent/pipe_channel_manager_test.rb +24 -6
  224. data/test/new_relic/agent/pipe_service_test.rb +6 -10
  225. data/test/new_relic/agent/rpm_agent_test.rb +4 -0
  226. data/test/new_relic/agent/rules_engine_test.rb +4 -0
  227. data/test/new_relic/agent/sampler_test.rb +4 -0
  228. data/test/new_relic/agent/shim_agent_test.rb +4 -0
  229. data/test/new_relic/agent/sql_sampler_test.rb +4 -0
  230. data/test/new_relic/agent/stats_engine/gc_profiler_test.rb +4 -0
  231. data/test/new_relic/agent/stats_engine/metric_stats_test.rb +21 -17
  232. data/test/new_relic/agent/stats_engine/samplers_test.rb +20 -10
  233. data/test/new_relic/agent/stats_engine_test.rb +4 -0
  234. data/test/new_relic/agent/stats_hash_test.rb +4 -0
  235. data/test/new_relic/agent/stats_test.rb +4 -0
  236. data/test/new_relic/agent/thread_profiler_test.rb +4 -0
  237. data/test/new_relic/agent/thread_test.rb +4 -0
  238. data/test/new_relic/agent/threaded_test.rb +4 -0
  239. data/test/new_relic/agent/transaction_info_test.rb +4 -0
  240. data/test/new_relic/agent/transaction_sample_builder_test.rb +4 -0
  241. data/test/new_relic/agent/transaction_sampler_test.rb +5 -1
  242. data/test/new_relic/agent/worker_loop_test.rb +4 -0
  243. data/test/new_relic/agent_test.rb +7 -3
  244. data/test/new_relic/coerce_test.rb +4 -0
  245. data/test/new_relic/collection_helper_test.rb +4 -0
  246. data/test/new_relic/command/deployments_test.rb +4 -0
  247. data/test/new_relic/control/class_methods_test.rb +4 -0
  248. data/test/new_relic/control/frameworks/rails_test.rb +4 -0
  249. data/test/new_relic/control_test.rb +4 -0
  250. data/test/new_relic/delayed_job_injection_test.rb +4 -0
  251. data/test/new_relic/dispatcher_test.rb +4 -0
  252. data/test/new_relic/fake_collector.rb +16 -4
  253. data/test/new_relic/framework_test.rb +4 -0
  254. data/test/new_relic/helper_test.rb +4 -1
  255. data/test/new_relic/license_test.rb +127 -0
  256. data/test/new_relic/load_test.rb +4 -0
  257. data/test/new_relic/local_environment_test.rb +4 -0
  258. data/test/new_relic/metric_data_test.rb +4 -0
  259. data/test/new_relic/metric_parser/metric_parser_test.rb +4 -0
  260. data/test/new_relic/metric_spec_test.rb +4 -0
  261. data/test/new_relic/noticed_error_test.rb +4 -0
  262. data/test/new_relic/rack/agent_hooks_test.rb +4 -0
  263. data/test/new_relic/rack/all_test.rb +4 -0
  264. data/test/new_relic/rack/browser_monitoring_test.rb +4 -0
  265. data/test/new_relic/rack/developer_mode_helper_test.rb +4 -0
  266. data/test/new_relic/rack/developer_mode_test.rb +4 -0
  267. data/test/new_relic/rack/error_collector_test.rb +4 -0
  268. data/test/new_relic/transaction_analysis/segment_summary_test.rb +4 -0
  269. data/test/new_relic/transaction_analysis_test.rb +4 -0
  270. data/test/new_relic/transaction_sample/composite_segment_test.rb +4 -0
  271. data/test/new_relic/transaction_sample/fake_segment_test.rb +4 -0
  272. data/test/new_relic/transaction_sample/segment_test.rb +4 -0
  273. data/test/new_relic/transaction_sample/summary_segment_test.rb +4 -0
  274. data/test/new_relic/transaction_sample_subtest_test.rb +4 -0
  275. data/test/new_relic/transaction_sample_test.rb +4 -0
  276. data/test/new_relic/version_number_test.rb +4 -0
  277. data/test/test_contexts.rb +4 -0
  278. data/test/test_helper.rb +4 -0
  279. data/ui/helpers/developer_mode_helper.rb +4 -0
  280. data/ui/helpers/google_pie_chart.rb +4 -0
  281. data/ui/views/newrelic/file/javascript/jquery-1.4.2.js +3 -0
  282. data/ui/views/newrelic/file/javascript/transaction_sample.js +3 -0
  283. data/ui/views/newrelic/index.rhtml +2 -2
  284. data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection/version.rb +4 -0
  285. data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb +4 -0
  286. data/vendor/gems/metric_parser-0.1.0.pre1/lib/metric_parser.rb +4 -0
  287. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/action_mailer.rb +4 -0
  288. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_merchant.rb +4 -0
  289. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_record.rb +4 -0
  290. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/apdex.rb +4 -0
  291. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/background_transaction.rb +4 -0
  292. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb +4 -0
  293. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller.rb +4 -0
  294. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb +4 -0
  295. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_ext.rb +4 -0
  296. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb +4 -0
  297. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database_pool.rb +4 -0
  298. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net.rb +4 -0
  299. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net_parser.rb +4 -0
  300. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/errors.rb +4 -0
  301. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/external.rb +4 -0
  302. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/frontend.rb +4 -0
  303. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/gc.rb +4 -0
  304. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/hibernate_session.rb +4 -0
  305. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java.rb +4 -0
  306. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java_parser.rb +4 -0
  307. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp.rb +4 -0
  308. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp_tag.rb +4 -0
  309. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb +4 -0
  310. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/metric_parser.rb +4 -0
  311. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/orm.rb +4 -0
  312. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb +4 -0
  313. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet.rb +4 -0
  314. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_context_listener.rb +4 -0
  315. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_filter.rb +4 -0
  316. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_init.rb +4 -0
  317. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr.rb +4 -0
  318. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr_request_handler.rb +4 -0
  319. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring.rb +4 -0
  320. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_controller.rb +4 -0
  321. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_view.rb +4 -0
  322. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_action.rb +4 -0
  323. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_result.rb +4 -0
  324. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/version.rb +4 -0
  325. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb +4 -0
  326. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_frontend.rb +4 -0
  327. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb +4 -0
  328. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb +4 -0
  329. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser.rb +4 -0
  330. data.tar.gz.sig +0 -0
  331. metadata +47 -19
  332. metadata.gz.sig +0 -0
  333. data/vendor/gems/dependency_detection-0.0.1.build/LICENSE +0 -5
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  module Multiverse
2
6
  module Runner
3
7
  extend self
@@ -1,4 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+ # This file is distributed under New Relic's license terms.
4
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
5
+
2
6
  require File.expand_path(File.join(File.dirname(__FILE__), 'environment'))
3
7
  module Multiverse
4
8
  class Suite
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
 
2
6
  require 'rubygems'
3
7
 
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # https://support.newrelic.com/tickets/2101
2
6
  # https://github.com/newrelic/rpm/pull/42
3
7
  # https://github.com/newrelic/rpm/pull/45
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # RUBY-981 Audit Log
2
6
 
3
7
  require 'newrelic_rpm'
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  require 'rack/test'
2
6
  require 'fake_collector'
3
7
  require './testing_app'
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # https://newrelic.atlassian.net/browse/RUBY-765
2
6
  require 'fake_collector'
3
7
 
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  class KeyTransactionsTest < Test::Unit::TestCase
2
6
  class TestWidget
3
7
  include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # RUBY-980 Improve logging
2
6
  # This test suite is for checking IMPORTANT conditions that we log rather than
3
7
  # trying to do this via brittle unit tests
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # https://newrelic.atlassian.net/wiki/display/eng/The+Terror+and+Glory+of+Transaction+Traces
2
6
  # https://newrelic.atlassian.net/browse/RUBY-914
3
7
 
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  require 'multiverse/color'
2
6
 
3
7
  class MethodVisibilityTest < Test::Unit::TestCase
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
 
2
6
  class NoDnsResolv < Test::Unit::TestCase
3
7
  def test_should_no_resolve_hostname_when_agent_is_disabled
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # https://newrelic.atlassian.net/browse/RUBY-669
2
6
 
3
7
  class PipeManagerTest < Test::Unit::TestCase
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  class RenameRuleTest < Test::Unit::TestCase
2
6
  class TestWidget
3
7
  include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  require 'rack/test'
2
6
  require 'new_relic/rack/browser_monitoring'
3
7
  require './testing_app'
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  require 'socket'
2
6
 
3
7
  class ServiceTimeoutTest < Test::Unit::TestCase
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  class SSLTest < Test::Unit::TestCase
2
6
 
3
7
  def setup
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # RUBY-839 make sure there is no STDOUT chatter
2
6
  require 'open3'
3
7
 
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
 
2
6
  require 'test/unit'
3
7
  require 'newrelic_rpm'
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
 
2
6
  require 'test/unit'
3
7
  require 'newrelic_rpm'
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  class TestingApp
2
6
 
3
7
  attr_accessor :response, :headers
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # https://newrelic.atlassian.net/wiki/display/eng/Agent+Thread+Profiling
2
6
  # https://newrelic.atlassian.net/browse/RUBY-917
3
7
 
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # Test the logic for loading the newrelic.yml config file.
2
6
  #
3
7
  # We will look at (in this priority):
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # https://support.newrelic.com/tickets/2101
2
6
  # https://github.com/newrelic/rpm/pull/42
3
7
  # https://github.com/newrelic/rpm/pull/45
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  require 'action_controller/railtie'
2
6
 
3
7
  # We define our single Rails application here, one time, upon the first inclusion
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # https://newrelic.atlassian.net/browse/RUBY-747
2
6
 
3
7
  require 'rails/test_help'
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  require './app'
2
6
 
3
7
  # GC instrumentation only works with REE or 1.9.x
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # https://newrelic.atlassian.net/browse/RUBY-927
2
6
 
3
7
  require 'rails/test_help'
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  require './app'
2
6
 
3
7
  ActionController::Base.view_paths = ['app/views']
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  # https://newrelic.atlassian.net/browse/RUBY-669
2
6
 
3
7
  require 'resque'
@@ -134,7 +138,7 @@ class ResqueTest < Test::Unit::TestCase
134
138
 
135
139
  run_worker(:env_vars => 'BROKEN_AFTER_FORK=true')
136
140
 
137
- assert File.read(log_path).include?('Unable to send data to parent process')
141
+ assert File.read(log_path).include?('No communication channel to parent process')
138
142
  end
139
143
 
140
144
  if RUBY_VERSION >= '1.9'
@@ -1,3 +1,7 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
1
5
  require 'resque'
2
6
  require 'newrelic_rpm'
3
7
 
@@ -0,0 +1,21 @@
1
+ suite_condition("SideKiq requires MRI 1.9.3 or JRuby 1.6 in 1.9 mode") do
2
+ RUBY_VERSION >= '1.9.3' || (RUBY_PLATFORM == 'java' && RUBY_VERSION >= '1.9')
3
+ end
4
+
5
+ gemfile <<-RB
6
+ gem 'json'
7
+ gem 'sidekiq'
8
+ gem 'rack'
9
+ RB
10
+
11
+ before_suite do
12
+ ENV["NEWRELIC_MULTIVERSE_REDIS_PORT"] = (20_000 + ($$ % 10_000)).to_s
13
+ ENV["NEWRELIC_MULTIVERSE_FAKE_COLLECTOR_PORT"] = (30_000 + ($$ % 10_000)).to_s
14
+ system("echo 'port #{ENV["NEWRELIC_MULTIVERSE_REDIS_PORT"]}' | redis-server - > /dev/null &")
15
+ end
16
+
17
+ after_suite do
18
+ system("redis-cli -p #{ENV["NEWRELIC_MULTIVERSE_REDIS_PORT"]} shutdown")
19
+ end
20
+
21
+ execute_mode 'spawn'
@@ -0,0 +1,25 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
5
+ require "newrelic_rpm"
6
+
7
+ REDIS_PORT = ENV['NEWRELIC_MULTIVERSE_REDIS_PORT']
8
+ REDIS_URL = "redis://localhost:#{REDIS_PORT}/0"
9
+
10
+ Sidekiq.configure_server do |config|
11
+ config.redis = { :url => REDIS_URL }
12
+ end
13
+
14
+ Sidekiq.configure_client do |config|
15
+ config.redis = { :url => REDIS_URL }
16
+ end
17
+
18
+ $redis = Redis.new(:port => REDIS_PORT)
19
+
20
+ class TestWorker
21
+ include Sidekiq::Worker
22
+ def perform(key, val)
23
+ $redis.sadd(key, val)
24
+ end
25
+ end
@@ -0,0 +1,22 @@
1
+ ---
2
+ development:
3
+ error_collector:
4
+ capture_source: true
5
+ enabled: true
6
+ apdex_t: 0.5
7
+ ssl: false
8
+ monitor_mode: true
9
+ license_key: bootstrap_newrelic_admin_license_key_000
10
+ developer_mode: false
11
+ app_name: test
12
+ host: 127.0.0.1
13
+ api_host: 127.0.0.1
14
+ port: <%= ENV['NEWRELIC_MULTIVERSE_FAKE_COLLECTOR_PORT'] %>
15
+ transaction_tracer:
16
+ record_sql: obfuscated
17
+ enabled: true
18
+ stack_trace_threshold: 0.5
19
+ transaction_threshold: 1.0
20
+ capture_params: false
21
+ log_level: debug
22
+ log_file_path: log
File without changes
@@ -0,0 +1,137 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
5
+ # https://newrelic.atlassian.net/browse/RUBY-775
6
+
7
+ require 'sidekiq'
8
+ require 'test/unit'
9
+ require 'newrelic_rpm'
10
+ require 'fake_collector'
11
+
12
+ class ResqueTest < Test::Unit::TestCase
13
+ JOB_COUNT = 5
14
+ COLLECTOR_PORT = ENV['NEWRELIC_MULTIVERSE_FAKE_COLLECTOR_PORT']
15
+
16
+ def setup
17
+ $collector ||= NewRelic::FakeCollector.new
18
+ $collector.reset
19
+ $collector.run(COLLECTOR_PORT)
20
+ @pidfile = "sidekiq.#{$$}.pid"
21
+ @sidekiq_log = "log/sidekiq.#{$$}.log"
22
+ JOB_COUNT.times do |i|
23
+ TestWorker.perform_async('jobs_completed', i + 1)
24
+ end
25
+ end
26
+
27
+ def teardown
28
+ $redis.flushall
29
+ File.unlink(@pidfile) if File.exist?(@pidfile)
30
+ File.unlink(@sidekiq_log) if File.exist?(@sidekiq_log)
31
+ end
32
+
33
+ def start_worker(opts={})
34
+ daemon_arg = opts[:daemonize] ? '-d' : ''
35
+ worker_cmd = "bundle exec sidekiq #{daemon_arg} -P #{@pidfile} -L #{@sidekiq_log} -r ./app.rb &"
36
+ system(worker_cmd)
37
+ end
38
+
39
+ def stop_worker
40
+ worker_pid = File.read(@pidfile).to_i
41
+ Process.kill("TERM", worker_pid)
42
+ begin
43
+ Timeout.timeout(5) { sleep(1) until !process_alive?(worker_pid) }
44
+ rescue Timeout::Error => e
45
+ raise e.exception("timed out waiting for sidekiq worker exit")
46
+ end
47
+ end
48
+
49
+ def process_alive?(pid)
50
+ Process.kill(0, pid)
51
+ return true
52
+ rescue Errno::ESRCH
53
+ return false
54
+ end
55
+
56
+ def wait_for_jobs
57
+ time_for_jobs = 5
58
+ begin
59
+ stats = Sidekiq::Stats.new
60
+ Timeout.timeout(time_for_jobs) { sleep(0.1) until stats.processed == JOB_COUNT }
61
+ rescue Timeout::Error => err
62
+ raise err.exception("waiting #{time_for_jobs}s for completion of #{JOB_COUNT} jobs")
63
+ end
64
+ end
65
+
66
+ def run_worker(opts={})
67
+ begin
68
+ start_worker(opts)
69
+ wait_for_jobs
70
+ ensure
71
+ stop_worker
72
+ end
73
+ end
74
+
75
+ # The point here is to supress Sidekiq log output for passing tests, but
76
+ # dump the log for failing tests.
77
+ def capture_sidekiq_log
78
+ File.unlink(@sidekiq_log) if File.exist?(@sidekiq_log)
79
+ @sidekiq_log = "log/sidekiq.#{$$}.log"
80
+ begin
81
+ yield
82
+ rescue Exception => e
83
+ if File.exist?(@sidekiq_log)
84
+ log_contents = File.read(@sidekiq_log)
85
+ $stderr.puts "Sidekiq log contents (#{@sidekiq_log}):"
86
+ $stderr.puts log_contents
87
+ end
88
+ raise e
89
+ end
90
+ File.unlink(@sidekiq_log) if File.exist?(@sidekiq_log)
91
+ end
92
+
93
+ METRIC_VALUES_POSITION = 3
94
+
95
+ def assert_metric_and_call_count(name, expected_call_count)
96
+ metric_data = $collector.calls_for('metric_data')
97
+ assert_equal(1, metric_data.size, "expected exactly one metric_data post from agent")
98
+
99
+ metric = metric_data.first[METRIC_VALUES_POSITION].find { |m| m[0]['name'] == name }
100
+ assert(metric, "could not find metric named #{name}")
101
+
102
+ call_count = metric[1][0]
103
+ assert_equal(expected_call_count, call_count)
104
+ end
105
+
106
+ def test_all_jobs_ran
107
+ capture_sidekiq_log do
108
+ run_worker
109
+ completed_jobs = Set.new($redis.smembers('jobs_completed').map(&:to_i))
110
+ expected_completed_jobs = Set.new((1..JOB_COUNT).to_a)
111
+ assert_equal(expected_completed_jobs, completed_jobs)
112
+ end
113
+ end
114
+
115
+ def test_agent_posts_correct_metric_data
116
+ capture_sidekiq_log do
117
+ run_worker
118
+ assert_metric_and_call_count('OtherTransaction/SidekiqJob/all', JOB_COUNT)
119
+ end
120
+ end
121
+
122
+ def test_all_jobs_ran_background
123
+ capture_sidekiq_log do
124
+ run_worker(:daemonize => true)
125
+ completed_jobs = Set.new($redis.smembers('jobs_completed').map(&:to_i))
126
+ expected_completed_jobs = Set.new((1..JOB_COUNT).to_a)
127
+ assert_equal(expected_completed_jobs, completed_jobs)
128
+ end
129
+ end
130
+
131
+ def test_agent_posts_correct_metric_data_background
132
+ capture_sidekiq_log do
133
+ run_worker(:daemonize => true)
134
+ assert_metric_and_call_count('OtherTransaction/SidekiqJob/all', JOB_COUNT)
135
+ end
136
+ end
137
+ end