newrelic_rpm 3.8.1.221 → 3.9.0.229

Sign up to get free protection for your applications and to get access to all the features.
Files changed (288) hide show
  1. data.tar.gz.sig +0 -0
  2. data/.gitignore +1 -0
  3. data/.yardopts +2 -0
  4. data/CHANGELOG +95 -0
  5. data/README.md +9 -3
  6. data/Rakefile +6 -0
  7. data/lib/new_relic/agent.rb +37 -52
  8. data/lib/new_relic/agent/agent.rb +32 -64
  9. data/lib/new_relic/agent/agent_logger.rb +3 -2
  10. data/lib/new_relic/agent/audit_logger.rb +2 -1
  11. data/lib/new_relic/agent/busy_calculator.rb +10 -8
  12. data/lib/new_relic/agent/configuration.rb +0 -13
  13. data/lib/new_relic/agent/configuration/default_source.rb +27 -20
  14. data/lib/new_relic/agent/configuration/manager.rb +101 -27
  15. data/lib/new_relic/agent/cross_app_monitor.rb +43 -50
  16. data/lib/new_relic/agent/cross_app_tracing.rb +13 -12
  17. data/lib/new_relic/agent/error_collector.rb +31 -35
  18. data/lib/new_relic/agent/harvester.rb +5 -1
  19. data/lib/new_relic/agent/hostname.rb +17 -0
  20. data/lib/new_relic/agent/http_clients/curb_wrappers.rb +1 -1
  21. data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +1 -1
  22. data/lib/new_relic/agent/http_clients/uri_util.rb +13 -0
  23. data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +18 -32
  24. data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +15 -15
  25. data/lib/new_relic/agent/instrumentation/active_merchant.rb +1 -1
  26. data/lib/new_relic/agent/instrumentation/active_record.rb +6 -4
  27. data/lib/new_relic/agent/instrumentation/active_record_helper.rb +3 -2
  28. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +18 -20
  29. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +79 -93
  30. data/lib/new_relic/agent/instrumentation/curb.rb +3 -3
  31. data/lib/new_relic/agent/instrumentation/data_mapper.rb +5 -4
  32. data/lib/new_relic/agent/instrumentation/middleware_proxy.rb +96 -0
  33. data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +69 -0
  34. data/lib/new_relic/agent/instrumentation/net.rb +1 -1
  35. data/lib/new_relic/agent/instrumentation/queue_time.rb +21 -13
  36. data/lib/new_relic/agent/instrumentation/rack.rb +85 -74
  37. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +3 -1
  38. data/lib/new_relic/agent/instrumentation/rails_middleware.rb +39 -0
  39. data/lib/new_relic/agent/instrumentation/rubyprof.rb +3 -3
  40. data/lib/new_relic/agent/instrumentation/sidekiq.rb +28 -5
  41. data/lib/new_relic/agent/instrumentation/sinatra.rb +4 -4
  42. data/lib/new_relic/agent/instrumentation/typhoeus.rb +4 -2
  43. data/lib/new_relic/agent/javascript_instrumentor.rb +34 -30
  44. data/lib/new_relic/agent/memory_logger.rb +12 -12
  45. data/lib/new_relic/agent/method_tracer.rb +34 -74
  46. data/lib/new_relic/agent/new_relic_service.rb +1 -1
  47. data/lib/new_relic/agent/pipe_channel_manager.rb +3 -3
  48. data/lib/new_relic/agent/request_sampler.rb +10 -11
  49. data/lib/new_relic/agent/samplers/vm_sampler.rb +6 -6
  50. data/lib/new_relic/agent/shim_agent.rb +2 -1
  51. data/lib/new_relic/agent/sql_sampler.rb +52 -27
  52. data/lib/new_relic/agent/stats.rb +24 -10
  53. data/lib/new_relic/agent/stats_engine/gc_profiler.rb +5 -17
  54. data/lib/new_relic/agent/stats_engine/metric_stats.rb +106 -58
  55. data/lib/new_relic/agent/stats_engine/stats_hash.rb +20 -24
  56. data/lib/new_relic/agent/supported_versions.rb +3 -1
  57. data/lib/new_relic/agent/threading/agent_thread.rb +42 -11
  58. data/lib/new_relic/agent/threading/backtrace_service.rb +3 -7
  59. data/lib/new_relic/agent/threading/thread_profile.rb +2 -2
  60. data/lib/new_relic/agent/traced_method_stack.rb +28 -18
  61. data/lib/new_relic/agent/transaction.rb +249 -196
  62. data/lib/new_relic/agent/transaction_metrics.rb +57 -0
  63. data/lib/new_relic/agent/transaction_sample_builder.rb +10 -7
  64. data/lib/new_relic/agent/transaction_sampler.rb +81 -45
  65. data/lib/new_relic/agent/transaction_state.rb +38 -49
  66. data/lib/new_relic/agent/vm/monotonic_gc_profiler.rb +15 -18
  67. data/lib/new_relic/agent/vm/rubinius_vm.rb +4 -2
  68. data/lib/new_relic/cli/commands/deployments.rb +3 -2
  69. data/lib/new_relic/control/frameworks/ruby.rb +2 -3
  70. data/lib/new_relic/control/frameworks/sinatra.rb +0 -7
  71. data/lib/new_relic/control/instance_methods.rb +3 -5
  72. data/lib/new_relic/json_wrapper.rb +2 -0
  73. data/lib/new_relic/language_support.rb +1 -1
  74. data/lib/new_relic/local_environment.rb +0 -16
  75. data/lib/new_relic/metric_spec.rb +10 -38
  76. data/lib/new_relic/noticed_error.rb +16 -11
  77. data/lib/new_relic/rack/agent_hooks.rb +4 -10
  78. data/lib/new_relic/rack/agent_middleware.rb +31 -0
  79. data/lib/new_relic/rack/browser_monitoring.rb +7 -13
  80. data/lib/new_relic/rack/developer_mode.rb +16 -59
  81. data/lib/new_relic/rack/error_collector.rb +16 -54
  82. data/lib/new_relic/recipes.rb +8 -101
  83. data/lib/new_relic/recipes/capistrano3.rb +66 -0
  84. data/lib/new_relic/recipes/capistrano_legacy.rb +98 -0
  85. data/lib/new_relic/transaction_sample.rb +6 -54
  86. data/lib/new_relic/transaction_sample/composite_segment.rb +1 -1
  87. data/lib/new_relic/transaction_sample/segment.rb +12 -4
  88. data/lib/new_relic/transaction_sample/summary_segment.rb +1 -1
  89. data/lib/new_relic/version.rb +2 -2
  90. data/lib/newrelic_rpm.rb +1 -1
  91. data/lib/sequel/extensions/newrelic_instrumentation.rb +19 -19
  92. data/lib/tasks/tests.rake +20 -1
  93. data/lib/tasks/versions.html.erb +0 -4
  94. data/lib/tasks/versions.rake +4 -3
  95. data/newrelic.yml +4 -12
  96. data/newrelic_rpm.gemspec +1 -1
  97. data/test/agent_helper.rb +146 -44
  98. data/test/config/newrelic.yml +0 -1
  99. data/test/environments/norails/Gemfile +1 -1
  100. data/test/environments/rails21/Gemfile +1 -1
  101. data/test/environments/rails22/Gemfile +1 -1
  102. data/test/environments/rails23/Gemfile +1 -1
  103. data/test/environments/rails30/Gemfile +1 -1
  104. data/test/environments/rails31/Gemfile +1 -1
  105. data/test/environments/rails32/Gemfile +1 -1
  106. data/test/environments/rails40/Gemfile +1 -1
  107. data/test/environments/rails41/Gemfile +1 -1
  108. data/test/multiverse/lib/multiverse/runner.rb +13 -1
  109. data/test/multiverse/lib/multiverse/suite.rb +26 -9
  110. data/test/multiverse/suites/active_record/config/newrelic.yml +0 -1
  111. data/test/multiverse/suites/activemerchant/Envfile +18 -1
  112. data/test/multiverse/suites/agent_only/audit_log_test.rb +4 -3
  113. data/test/multiverse/suites/agent_only/collector_exception_handling_test.rb +35 -0
  114. data/test/multiverse/suites/agent_only/config/newrelic.yml +0 -1
  115. data/test/multiverse/suites/agent_only/cross_application_tracing_test.rb +1 -0
  116. data/test/multiverse/suites/agent_only/encoding_handling_test.rb +3 -2
  117. data/test/multiverse/suites/agent_only/exclusive_time_test.rb +178 -0
  118. data/test/multiverse/suites/agent_only/logging_test.rb +10 -6
  119. data/test/multiverse/suites/agent_only/marshaling_test.rb +11 -9
  120. data/test/multiverse/suites/agent_only/script/loading.rb +1 -1
  121. data/test/multiverse/suites/agent_only/service_timeout_test.rb +5 -1
  122. data/test/multiverse/suites/agent_only/transaction_ignoring_test.rb +2 -1
  123. data/test/multiverse/suites/agent_only/xray_sessions_test.rb +9 -9
  124. data/test/multiverse/suites/capistrano/Capfile +26 -0
  125. data/test/multiverse/suites/capistrano/Envfile +18 -0
  126. data/test/multiverse/suites/capistrano/config/deploy.rb +10 -0
  127. data/test/multiverse/suites/capistrano/config/deploy/production.rb +9 -0
  128. data/test/multiverse/suites/capistrano/config/newrelic.yml +21 -0
  129. data/test/multiverse/suites/capistrano/deployment_test.rb +47 -0
  130. data/test/multiverse/suites/capistrano2/Capfile +4 -0
  131. data/test/multiverse/suites/capistrano2/Envfile +4 -0
  132. data/test/multiverse/suites/capistrano2/config/deploy.rb +19 -0
  133. data/test/multiverse/suites/capistrano2/config/newrelic.yml +21 -0
  134. data/test/multiverse/suites/capistrano2/deployment_test.rb +38 -0
  135. data/test/multiverse/suites/curb/Envfile +10 -1
  136. data/test/multiverse/suites/curb/config/newrelic.yml +0 -1
  137. data/test/multiverse/suites/datamapper/config/newrelic.yml +0 -1
  138. data/test/multiverse/suites/deferred_instrumentation/config/newrelic.yml +0 -1
  139. data/test/multiverse/suites/excon/config/newrelic.yml +0 -1
  140. data/test/multiverse/suites/httpclient/config/newrelic.yml +0 -1
  141. data/test/multiverse/suites/mongo/config/newrelic.yml +0 -1
  142. data/test/multiverse/suites/net_http/config/newrelic.yml +0 -1
  143. data/test/multiverse/suites/padrino/config/newrelic.yml +0 -1
  144. data/test/multiverse/suites/rack/Envfile +25 -0
  145. data/test/multiverse/suites/rack/example_app.rb +50 -0
  146. data/test/multiverse/suites/rack/nested_non_rack_app_test.rb +66 -0
  147. data/test/multiverse/suites/rack/rack_auto_instrumentation_test.rb +143 -0
  148. data/test/multiverse/suites/rack/rack_unsupported_version_test.rb +45 -0
  149. data/test/multiverse/suites/rack/url_map_test.rb +120 -0
  150. data/test/multiverse/suites/rails/Envfile +10 -0
  151. data/test/multiverse/suites/rails/app.rb +28 -63
  152. data/test/multiverse/suites/rails/bad_instrumentation_test.rb +2 -4
  153. data/test/multiverse/suites/rails/config/newrelic.yml +1 -2
  154. data/test/multiverse/suites/rails/dummy.txt +1 -0
  155. data/test/multiverse/suites/rails/error_tracing_test.rb +46 -31
  156. data/test/multiverse/suites/rails/gc_instrumentation_test.rb +0 -1
  157. data/test/multiverse/suites/rails/ignore_test.rb +9 -3
  158. data/test/multiverse/suites/rails/middleware_instrumentation_test.rb +41 -0
  159. data/test/multiverse/suites/rails/middlewares.rb +19 -0
  160. data/test/multiverse/suites/rails/parameter_capture_test.rb +169 -0
  161. data/test/multiverse/suites/rails/queue_time_test.rb +14 -4
  162. data/test/multiverse/suites/rails/rails2_app/app/controllers/application.rb +7 -0
  163. data/test/multiverse/suites/rails/rails2_app/config/boot.rb +127 -0
  164. data/test/multiverse/suites/rails/rails2_app/config/database.yml +18 -0
  165. data/test/multiverse/suites/rails/rails2_app/config/environment.rb +16 -0
  166. data/test/multiverse/suites/rails/rails2_app/config/environments/development.rb +10 -0
  167. data/test/multiverse/suites/rails/rails2_app/config/initializers/load_newrelic_rpm.rb +9 -0
  168. data/test/multiverse/suites/rails/rails2_app/config/preinitializer.rb +25 -0
  169. data/test/multiverse/suites/rails/rails2_app/config/routes.rb +18 -0
  170. data/test/multiverse/suites/rails/rails2_app/db/schema.rb +5 -0
  171. data/test/multiverse/suites/rails/rails3_app/app_rails3_plus.rb +76 -0
  172. data/test/multiverse/suites/rails/request_statistics_test.rb +2 -4
  173. data/test/multiverse/suites/rails/transaction_ignoring_test.rb +3 -5
  174. data/test/multiverse/suites/rails/view_instrumentation_test.rb +73 -42
  175. data/test/multiverse/suites/resque/config/newrelic.yml +0 -1
  176. data/test/multiverse/suites/sequel/config/newrelic.yml +0 -1
  177. data/test/multiverse/suites/sidekiq/Envfile +4 -0
  178. data/test/multiverse/suites/sidekiq/after_suite.rb +7 -0
  179. data/test/multiverse/suites/sidekiq/config/newrelic.yml +0 -1
  180. data/test/multiverse/suites/sidekiq/sidekiq_instrumentation_test.rb +55 -34
  181. data/test/multiverse/suites/sidekiq/sidekiq_server.rb +30 -0
  182. data/test/multiverse/suites/sidekiq/test_worker.rb +60 -0
  183. data/test/multiverse/suites/sinatra/config/newrelic.yml +0 -1
  184. data/test/multiverse/suites/sinatra/ignoring_test.rb +33 -11
  185. data/test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb +3 -1
  186. data/test/multiverse/suites/typhoeus/Envfile +9 -0
  187. data/test/multiverse/suites/typhoeus/config/newrelic.yml +0 -1
  188. data/test/multiverse/suites/typhoeus/typhoeus_test.rb +10 -0
  189. data/test/multiverse/test/suite_examples/one/a/config/newrelic.yml +0 -1
  190. data/test/multiverse/test/suite_examples/one/b/config/newrelic.yml +0 -1
  191. data/test/new_relic/agent/agent/connect_test.rb +3 -10
  192. data/test/new_relic/agent/agent_logger_test.rb +24 -6
  193. data/test/new_relic/agent/agent_test.rb +7 -8
  194. data/test/new_relic/agent/agent_test_controller.rb +2 -2
  195. data/test/new_relic/agent/audit_logger_test.rb +5 -1
  196. data/test/new_relic/agent/busy_calculator_test.rb +1 -1
  197. data/test/new_relic/agent/configuration/manager_test.rb +68 -69
  198. data/test/new_relic/agent/cross_app_monitor_test.rb +32 -14
  199. data/test/new_relic/agent/cross_app_tracing_test.rb +2 -2
  200. data/test/new_relic/agent/error_collector/notice_error_test.rb +9 -33
  201. data/test/new_relic/agent/error_collector_test.rb +45 -14
  202. data/test/new_relic/agent/harvester_test.rb +9 -0
  203. data/test/new_relic/agent/hostname_test.rb +41 -0
  204. data/test/new_relic/agent/instrumentation/action_controller_subscriber_test.rb +27 -19
  205. data/test/new_relic/agent/instrumentation/active_record_subscriber_test.rb +1 -1
  206. data/test/new_relic/agent/instrumentation/active_record_test.rb +3 -3
  207. data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +95 -14
  208. data/test/new_relic/agent/instrumentation/middleware_proxy_test.rb +189 -0
  209. data/test/new_relic/agent/instrumentation/net_instrumentation_test.rb +2 -2
  210. data/test/new_relic/agent/instrumentation/queue_time_test.rb +18 -1
  211. data/test/new_relic/agent/instrumentation/rack_test.rb +10 -1
  212. data/test/new_relic/agent/instrumentation/sinatra_test.rb +3 -1
  213. data/test/new_relic/agent/javascript_instrumentor_test.rb +28 -41
  214. data/test/new_relic/agent/memory_logger_test.rb +14 -0
  215. data/test/new_relic/agent/method_interrobang_test.rb +1 -1
  216. data/test/new_relic/agent/method_tracer/class_methods/add_method_tracer_test.rb +1 -30
  217. data/test/new_relic/agent/method_tracer/instance_methods/trace_execution_scoped_test.rb +5 -21
  218. data/test/new_relic/agent/method_tracer_test.rb +5 -4
  219. data/test/new_relic/agent/mock_scope_listener.rb +2 -2
  220. data/test/new_relic/agent/obfuscator_test.rb +1 -1
  221. data/test/new_relic/agent/pipe_channel_manager_test.rb +17 -5
  222. data/test/new_relic/agent/request_sampler_test.rb +16 -16
  223. data/test/new_relic/agent/rpm_agent_test.rb +23 -29
  224. data/test/new_relic/agent/sql_sampler_test.rb +39 -31
  225. data/test/new_relic/agent/stats_engine/metric_stats_test.rb +189 -117
  226. data/test/new_relic/agent/stats_engine_test.rb +1 -1
  227. data/test/new_relic/agent/stats_hash_test.rb +28 -1
  228. data/test/new_relic/agent/stats_test.rb +1 -12
  229. data/test/new_relic/agent/threading/agent_thread_test.rb +23 -9
  230. data/test/new_relic/agent/threading/backtrace_service_test.rb +33 -32
  231. data/test/new_relic/agent/threading/fake_thread.rb +4 -8
  232. data/test/new_relic/agent/threading/threaded_test_case.rb +4 -14
  233. data/test/new_relic/agent/traced_method_stack_test.rb +43 -27
  234. data/test/new_relic/agent/transaction_interrobang_test.rb +1 -1
  235. data/test/new_relic/agent/transaction_metrics_test.rb +113 -0
  236. data/test/new_relic/agent/transaction_sample_builder_test.rb +1 -61
  237. data/test/new_relic/agent/transaction_sampler_test.rb +176 -228
  238. data/test/new_relic/agent/transaction_state_test.rb +62 -26
  239. data/test/new_relic/agent/transaction_test.rb +198 -80
  240. data/test/new_relic/agent/vm/monotonic_gc_profiler_test.rb +4 -4
  241. data/test/new_relic/agent/vm/rubinius_vm_test.rb +68 -0
  242. data/test/new_relic/agent_test.rb +31 -27
  243. data/test/new_relic/cli/commands/deployments_test.rb +7 -2
  244. data/test/new_relic/control/instance_methods_test.rb +4 -4
  245. data/test/new_relic/control_test.rb +28 -22
  246. data/test/new_relic/dependency_detection_test.rb +14 -0
  247. data/test/new_relic/fake_external_server.rb +1 -0
  248. data/test/new_relic/fake_rpm_site.rb +35 -0
  249. data/test/new_relic/http_client_test_cases.rb +12 -3
  250. data/test/new_relic/json_wrapper_test.rb +5 -0
  251. data/test/new_relic/language_support_test.rb +7 -0
  252. data/test/new_relic/license_test.rb +11 -5
  253. data/test/new_relic/local_environment_test.rb +0 -18
  254. data/test/new_relic/metric_data_test.rb +2 -2
  255. data/test/new_relic/metric_spec_test.rb +4 -23
  256. data/test/new_relic/multiverse_helpers.rb +1 -3
  257. data/test/new_relic/noticed_error_test.rb +6 -22
  258. data/test/new_relic/rack/agent_hooks_test.rb +5 -1
  259. data/test/new_relic/rack/agent_middleware_test.rb +32 -0
  260. data/test/new_relic/rack/browser_monitoring_test.rb +14 -1
  261. data/test/new_relic/rack/developer_mode_helper_test.rb +0 -8
  262. data/test/new_relic/rack/developer_mode_test.rb +1 -1
  263. data/test/new_relic/rack/error_collector_test.rb +6 -30
  264. data/test/new_relic/transaction_sample/fake_segment_test.rb +2 -2
  265. data/test/new_relic/transaction_sample/segment_test.rb +47 -47
  266. data/test/new_relic/transaction_sample_test.rb +9 -8
  267. data/test/performance/lib/performance/instrumentation/stackprof.rb +11 -8
  268. data/test/performance/script/runner +13 -0
  269. data/test/performance/suites/config.rb +5 -2
  270. data/test/performance/suites/rack_middleware.rb +84 -0
  271. data/test/performance/suites/rum_autoinsertion.rb +1 -1
  272. data/test/performance/suites/thread_profiling.rb +1 -1
  273. data/test/test_helper.rb +12 -10
  274. data/ui/helpers/developer_mode_helper.rb +3 -43
  275. data/ui/views/layouts/newrelic_default.rhtml +2 -2
  276. data/ui/views/newrelic/_sample.rhtml +2 -2
  277. data/ui/views/newrelic/_sql_row.rhtml +11 -11
  278. data/ui/views/newrelic/index.rhtml +21 -22
  279. data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb +15 -10
  280. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser.rb +2 -0
  281. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb +34 -0
  282. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/nested.rb +24 -0
  283. metadata +108 -31
  284. metadata.gz.sig +0 -0
  285. data/lib/new_relic/rack/transaction_reset.rb +0 -20
  286. data/test/multiverse/suites/rails/mongrel_queue_depth_test.rb +0 -42
  287. data/test/new_relic/rack/transaction_reset_test.rb +0 -35
  288. data/ui/views/newrelic/show_source.rhtml +0 -3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.1.221
4
+ version: 3.9.0.229
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -41,7 +41,7 @@ cert_chain:
41
41
  K0ZZTXduQWIrVm1OT2h2MVMrc0poYmpaMzBQS2d6NnZMaFQ2dW5pZUNqTGs5
42
42
  d0dHbWxTSwpZamJudkE5cXJhTExhalNqCi0tLS0tRU5EIENFUlRJRklDQVRF
43
43
  LS0tLS0K
44
- date: 2014-05-15 00:00:00.000000000 Z
44
+ date: 2014-06-25 00:00:00.000000000 Z
45
45
  dependencies:
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rake
@@ -128,17 +128,17 @@ dependencies:
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
- - - ! '>='
131
+ - - ~>
132
132
  - !ruby/object:Gem::Version
133
- version: '0'
133
+ version: 0.9.12
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements:
139
- - - ! '>='
139
+ - - ~>
140
140
  - !ruby/object:Gem::Version
141
- version: '0'
141
+ version: 0.9.12
142
142
  - !ruby/object:Gem::Dependency
143
143
  name: guard
144
144
  requirement: !ruby/object:Gem::Requirement
@@ -289,6 +289,7 @@ files:
289
289
  - lib/new_relic/agent/error_collector.rb
290
290
  - lib/new_relic/agent/event_listener.rb
291
291
  - lib/new_relic/agent/harvester.rb
292
+ - lib/new_relic/agent/hostname.rb
292
293
  - lib/new_relic/agent/http_clients/curb_wrappers.rb
293
294
  - lib/new_relic/agent/http_clients/excon_wrappers.rb
294
295
  - lib/new_relic/agent/http_clients/httpclient_wrappers.rb
@@ -318,6 +319,8 @@ files:
318
319
  - lib/new_relic/agent/instrumentation/merb/controller.rb
319
320
  - lib/new_relic/agent/instrumentation/merb/errors.rb
320
321
  - lib/new_relic/agent/instrumentation/metric_frame.rb
322
+ - lib/new_relic/agent/instrumentation/middleware_proxy.rb
323
+ - lib/new_relic/agent/instrumentation/middleware_tracing.rb
321
324
  - lib/new_relic/agent/instrumentation/mongo.rb
322
325
  - lib/new_relic/agent/instrumentation/net.rb
323
326
  - lib/new_relic/agent/instrumentation/padrino.rb
@@ -332,6 +335,7 @@ files:
332
335
  - lib/new_relic/agent/instrumentation/rails4/action_controller.rb
333
336
  - lib/new_relic/agent/instrumentation/rails4/action_view.rb
334
337
  - lib/new_relic/agent/instrumentation/rails4/errors.rb
338
+ - lib/new_relic/agent/instrumentation/rails_middleware.rb
335
339
  - lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb
336
340
  - lib/new_relic/agent/instrumentation/resque.rb
337
341
  - lib/new_relic/agent/instrumentation/rubyprof.rb
@@ -382,6 +386,7 @@ files:
382
386
  - lib/new_relic/agent/transaction/slowest_sample_buffer.rb
383
387
  - lib/new_relic/agent/transaction/transaction_sample_buffer.rb
384
388
  - lib/new_relic/agent/transaction/xray_sample_buffer.rb
389
+ - lib/new_relic/agent/transaction_metrics.rb
385
390
  - lib/new_relic/agent/transaction_sample_builder.rb
386
391
  - lib/new_relic/agent/transaction_sampler.rb
387
392
  - lib/new_relic/agent/transaction_state.rb
@@ -426,11 +431,13 @@ files:
426
431
  - lib/new_relic/okjson.rb
427
432
  - lib/new_relic/rack.rb
428
433
  - lib/new_relic/rack/agent_hooks.rb
434
+ - lib/new_relic/rack/agent_middleware.rb
429
435
  - lib/new_relic/rack/browser_monitoring.rb
430
436
  - lib/new_relic/rack/developer_mode.rb
431
437
  - lib/new_relic/rack/error_collector.rb
432
- - lib/new_relic/rack/transaction_reset.rb
433
438
  - lib/new_relic/recipes.rb
439
+ - lib/new_relic/recipes/capistrano3.rb
440
+ - lib/new_relic/recipes/capistrano_legacy.rb
434
441
  - lib/new_relic/timer_lib.rb
435
442
  - lib/new_relic/transaction_analysis.rb
436
443
  - lib/new_relic/transaction_analysis/segment_summary.rb
@@ -696,6 +703,7 @@ files:
696
703
  - test/multiverse/suites/agent_only/cross_application_tracing_test.rb
697
704
  - test/multiverse/suites/agent_only/custom_queue_time_test.rb
698
705
  - test/multiverse/suites/agent_only/encoding_handling_test.rb
706
+ - test/multiverse/suites/agent_only/exclusive_time_test.rb
699
707
  - test/multiverse/suites/agent_only/harvest_timestamps_test.rb
700
708
  - test/multiverse/suites/agent_only/http_response_code_test.rb
701
709
  - test/multiverse/suites/agent_only/key_transactions_test.rb
@@ -715,6 +723,17 @@ files:
715
723
  - test/multiverse/suites/agent_only/xray_sessions_test.rb
716
724
  - test/multiverse/suites/bare/Envfile
717
725
  - test/multiverse/suites/bare/standalone_instrumentation_test.rb
726
+ - test/multiverse/suites/capistrano/Capfile
727
+ - test/multiverse/suites/capistrano/Envfile
728
+ - test/multiverse/suites/capistrano/config/deploy.rb
729
+ - test/multiverse/suites/capistrano/config/deploy/production.rb
730
+ - test/multiverse/suites/capistrano/config/newrelic.yml
731
+ - test/multiverse/suites/capistrano/deployment_test.rb
732
+ - test/multiverse/suites/capistrano2/Capfile
733
+ - test/multiverse/suites/capistrano2/Envfile
734
+ - test/multiverse/suites/capistrano2/config/deploy.rb
735
+ - test/multiverse/suites/capistrano2/config/newrelic.yml
736
+ - test/multiverse/suites/capistrano2/deployment_test.rb
718
737
  - test/multiverse/suites/config_file_loading/Envfile
719
738
  - test/multiverse/suites/config_file_loading/config_file_loading_test.rb
720
739
  - test/multiverse/suites/curb/Envfile
@@ -748,6 +767,12 @@ files:
748
767
  - test/multiverse/suites/padrino/Envfile
749
768
  - test/multiverse/suites/padrino/config/newrelic.yml
750
769
  - test/multiverse/suites/padrino/padrino_test.rb
770
+ - test/multiverse/suites/rack/Envfile
771
+ - test/multiverse/suites/rack/example_app.rb
772
+ - test/multiverse/suites/rack/nested_non_rack_app_test.rb
773
+ - test/multiverse/suites/rack/rack_auto_instrumentation_test.rb
774
+ - test/multiverse/suites/rack/rack_unsupported_version_test.rb
775
+ - test/multiverse/suites/rack/url_map_test.rb
751
776
  - test/multiverse/suites/rails/Envfile
752
777
  - test/multiverse/suites/rails/app.rb
753
778
  - test/multiverse/suites/rails/app/views/foos/_foo.html.haml
@@ -759,11 +784,24 @@ files:
759
784
  - test/multiverse/suites/rails/app/views/views/index.html.erb
760
785
  - test/multiverse/suites/rails/bad_instrumentation_test.rb
761
786
  - test/multiverse/suites/rails/config/newrelic.yml
787
+ - test/multiverse/suites/rails/dummy.txt
762
788
  - test/multiverse/suites/rails/error_tracing_test.rb
763
789
  - test/multiverse/suites/rails/gc_instrumentation_test.rb
764
790
  - test/multiverse/suites/rails/ignore_test.rb
765
- - test/multiverse/suites/rails/mongrel_queue_depth_test.rb
791
+ - test/multiverse/suites/rails/middleware_instrumentation_test.rb
792
+ - test/multiverse/suites/rails/middlewares.rb
793
+ - test/multiverse/suites/rails/parameter_capture_test.rb
766
794
  - test/multiverse/suites/rails/queue_time_test.rb
795
+ - test/multiverse/suites/rails/rails2_app/app/controllers/application.rb
796
+ - test/multiverse/suites/rails/rails2_app/config/boot.rb
797
+ - test/multiverse/suites/rails/rails2_app/config/database.yml
798
+ - test/multiverse/suites/rails/rails2_app/config/environment.rb
799
+ - test/multiverse/suites/rails/rails2_app/config/environments/development.rb
800
+ - test/multiverse/suites/rails/rails2_app/config/initializers/load_newrelic_rpm.rb
801
+ - test/multiverse/suites/rails/rails2_app/config/preinitializer.rb
802
+ - test/multiverse/suites/rails/rails2_app/config/routes.rb
803
+ - test/multiverse/suites/rails/rails2_app/db/schema.rb
804
+ - test/multiverse/suites/rails/rails3_app/app_rails3_plus.rb
767
805
  - test/multiverse/suites/rails/request_statistics_test.rb
768
806
  - test/multiverse/suites/rails/transaction_ignoring_test.rb
769
807
  - test/multiverse/suites/rails/view_instrumentation_test.rb
@@ -777,9 +815,12 @@ files:
777
815
  - test/multiverse/suites/sequel/sequel_instrumentation_test.rb
778
816
  - test/multiverse/suites/sequel/sequel_safety_test.rb
779
817
  - test/multiverse/suites/sidekiq/Envfile
818
+ - test/multiverse/suites/sidekiq/after_suite.rb
780
819
  - test/multiverse/suites/sidekiq/config/newrelic.yml
781
820
  - test/multiverse/suites/sidekiq/log/.gitkeep
782
821
  - test/multiverse/suites/sidekiq/sidekiq_instrumentation_test.rb
822
+ - test/multiverse/suites/sidekiq/sidekiq_server.rb
823
+ - test/multiverse/suites/sidekiq/test_worker.rb
783
824
  - test/multiverse/suites/sinatra/Envfile
784
825
  - test/multiverse/suites/sinatra/config/newrelic.yml
785
826
  - test/multiverse/suites/sinatra/ignoring_test.rb
@@ -841,6 +882,7 @@ files:
841
882
  - test/new_relic/agent/error_collector_test.rb
842
883
  - test/new_relic/agent/event_listener_test.rb
843
884
  - test/new_relic/agent/harvester_test.rb
885
+ - test/new_relic/agent/hostname_test.rb
844
886
  - test/new_relic/agent/http_clients/uri_util_test.rb
845
887
  - test/new_relic/agent/instrumentation/action_controller_subscriber_test.rb
846
888
  - test/new_relic/agent/instrumentation/action_view_subscriber_test.rb
@@ -850,6 +892,7 @@ files:
850
892
  - test/new_relic/agent/instrumentation/controller_instrumentation_test.rb
851
893
  - test/new_relic/agent/instrumentation/instrumentation_test.rb
852
894
  - test/new_relic/agent/instrumentation/metric_frame_test.rb
895
+ - test/new_relic/agent/instrumentation/middleware_proxy_test.rb
853
896
  - test/new_relic/agent/instrumentation/net_instrumentation_test.rb
854
897
  - test/new_relic/agent/instrumentation/queue_time_test.rb
855
898
  - test/new_relic/agent/instrumentation/rack_test.rb
@@ -897,6 +940,7 @@ files:
897
940
  - test/new_relic/agent/transaction/slowest_sample_buffer_test.rb
898
941
  - test/new_relic/agent/transaction/xray_sample_buffer_test.rb
899
942
  - test/new_relic/agent/transaction_interrobang_test.rb
943
+ - test/new_relic/agent/transaction_metrics_test.rb
900
944
  - test/new_relic/agent/transaction_sample_builder_test.rb
901
945
  - test/new_relic/agent/transaction_sampler_test.rb
902
946
  - test/new_relic/agent/transaction_state_test.rb
@@ -904,6 +948,7 @@ files:
904
948
  - test/new_relic/agent/transaction_timings_test.rb
905
949
  - test/new_relic/agent/vm/monotonic_gc_profiler_test.rb
906
950
  - test/new_relic/agent/vm/mri_vm_test.rb
951
+ - test/new_relic/agent/vm/rubinius_vm_test.rb
907
952
  - test/new_relic/agent/vm/snapshot_test.rb
908
953
  - test/new_relic/agent/vm_test.rb
909
954
  - test/new_relic/agent/worker_loop_test.rb
@@ -922,6 +967,7 @@ files:
922
967
  - test/new_relic/evil_server.rb
923
968
  - test/new_relic/fake_collector.rb
924
969
  - test/new_relic/fake_external_server.rb
970
+ - test/new_relic/fake_rpm_site.rb
925
971
  - test/new_relic/fake_server.rb
926
972
  - test/new_relic/framework_test.rb
927
973
  - test/new_relic/http_client_test_cases.rb
@@ -937,13 +983,13 @@ files:
937
983
  - test/new_relic/multiverse_helpers.rb
938
984
  - test/new_relic/noticed_error_test.rb
939
985
  - test/new_relic/rack/agent_hooks_test.rb
986
+ - test/new_relic/rack/agent_middleware_test.rb
940
987
  - test/new_relic/rack/all_test.rb
941
988
  - test/new_relic/rack/browser_monitoring_test.rb
942
989
  - test/new_relic/rack/deferred_instrumentation_test.rb
943
990
  - test/new_relic/rack/developer_mode_helper_test.rb
944
991
  - test/new_relic/rack/developer_mode_test.rb
945
992
  - test/new_relic/rack/error_collector_test.rb
946
- - test/new_relic/rack/transaction_reset_test.rb
947
993
  - test/new_relic/transaction_analysis/segment_summary_test.rb
948
994
  - test/new_relic/transaction_analysis_test.rb
949
995
  - test/new_relic/transaction_ignoring_test_cases.rb
@@ -975,6 +1021,7 @@ files:
975
1021
  - test/performance/script/runner
976
1022
  - test/performance/suites/config.rb
977
1023
  - test/performance/suites/marshalling.rb
1024
+ - test/performance/suites/rack_middleware.rb
978
1025
  - test/performance/suites/rum_autoinsertion.rb
979
1026
  - test/performance/suites/startup.rb
980
1027
  - test/performance/suites/thread_profiling.rb
@@ -1015,7 +1062,6 @@ files:
1015
1062
  - ui/views/newrelic/index.rhtml
1016
1063
  - ui/views/newrelic/sample_not_found.rhtml
1017
1064
  - ui/views/newrelic/show_sample.rhtml
1018
- - ui/views/newrelic/show_source.rhtml
1019
1065
  - ui/views/newrelic/threads.rhtml
1020
1066
  - vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb
1021
1067
  - vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection/version.rb
@@ -1046,6 +1092,8 @@ files:
1046
1092
  - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp_tag.rb
1047
1093
  - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
1048
1094
  - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/metric_parser.rb
1095
+ - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb
1096
+ - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/nested.rb
1049
1097
  - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/orm.rb
1050
1098
  - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb
1051
1099
  - vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet.rb
@@ -1070,27 +1118,56 @@ licenses:
1070
1118
  - New Relic
1071
1119
  - MIT
1072
1120
  - Ruby
1073
- post_install_message: ! "# New Relic Ruby Agent Release Notes #\n\n## v3.8.1 ##\n\n*
1074
- Better handling for Rack applications implemented as middlewares\n\n When using
1075
- a Sinatra application as a middleware around another app (for\n example, a Rails
1076
- app), or manually instrumenting a Rack middleware wrapped\n around another application,
1077
- the agent would previously generate two separate\n transaction names in the New
1078
- Relic UI (one for the middleware, and one for\n the inner application).\n\n As
1079
- of this release, the agent will instead unify these two parts into a single\n transaction
1080
- in the UI. The unified name will be the name assigned to the\n inner-most traced
1081
- transaction by default. Calls to\n NewRelic::Agent.set_transaction_name will continue
1082
- to override the default\n names assigned by the agent's instrumentation code.\n\n
1083
- \ This change also makes it possible to run X-Ray sessions against transactions\n
1084
- \ of the 'inner' application in cases where one instrumented app is wrapped in\n
1085
- \ another that's implemented as a middleware.\n\n* Support for mongo-1.10.0\n\n
1086
- \ The Ruby agent now instruments version 1.10.0 of the mongo gem (versions 1.8.x\n
1087
- \ and 1.9.x were already supported, and continue to be).\n\n* Allow setting configuration
1088
- file path via an option to manual_start\n\n Previously, passing the :config_path
1089
- option to NewRelic::Agent.manual_start\n would not actually affect the location
1090
- that the agent would use to look for\n its configuration file. This has been fixed,
1091
- and the log messages emitted when\n a configuration file is not found should now
1092
- be more helpful.\n\n See https://github.com/newrelic/rpm/blob/master/CHANGELOG
1093
- for a full list of\n changes.\n"
1121
+ post_install_message: ! "# New Relic Ruby Agent Release Notes #\n\n## v3.9.0 ##\n\n*
1122
+ Rack middleware instrumentation\n\n The Ruby agent now automatically instruments
1123
+ Rack middlewares!\n\n This means that the agent can now give you a more complete
1124
+ picture of your\n application's response time, including time spent in middleware.
1125
+ It also means\n that requests which previously weren't captured by the agent because
1126
+ they\n never made it to the bottom of your middleware stack (usually a Rails or\n
1127
+ \ Sinatra application) will now be captured.\n\n After installing this version
1128
+ of the Ruby agent, you'll see a new 'Middleware'\n band on your application's overview
1129
+ graph, and individual middlewares will\n appear in transaction breakdown charts
1130
+ and transaction traces.\n\n The agent can instrument middlewares that are added
1131
+ from a config.ru file via\n Rack::Builder, or via Rails' middleware stack in Rails
1132
+ 3.0+.\n\n This instrumentation may be disabled with the\n disable_middlware_instrumentation
1133
+ configuration setting.\n\n For more details, see the documentation for this feature:\n\n
1134
+ \ - http://docs.newrelic.com/docs/ruby/rack-middlewares\n - http://docs.newrelic.com/docs/ruby/middleware-upgrade-changes\n\n*
1135
+ Capistrano 3.x support\n\n Recording application deployments using Capistrano 3.x
1136
+ is now supported.\n\n Many thanks to Jennifer Page for the contribution!\n\n* Better
1137
+ support for Sidekiq's Delayed extensions\n\n Sidekiq jobs executed via the Delayed
1138
+ extensions (e.g. the #delay method) will\n now be named after the actual class
1139
+ that #delay was invoked against, and will\n have their job arguments correctly
1140
+ captured if the sidekiq.capture_params\n configuration setting is enabled.\n\n
1141
+ \ Many thanks to printercu for the contribution!\n\n* Improved Apdex calculation
1142
+ with ignored error classes\n\n Previously, a transaction resulting in an exception
1143
+ that bubbled up to the top\n level would always be counted as failing for the purposes
1144
+ of Apdex\n calculations (unless the transaction name was ignored entirely). Now,\n
1145
+ \ exceptions whose classes have been ignored by the\n error_collector.ignore_errors
1146
+ configuration setting will not cause a\n transaction to be automatically counted
1147
+ as failing.\n\n* Allow URIs that are not parseable by stdlib's URI if addressable
1148
+ is present\n\n There are some URIs that are valid by RFC 3986, but not parseable
1149
+ by Ruby's\n stdlib URI class. The Ruby agent will now attempt to use the addressable
1150
+ gem\n to parse URIs if it is present, allowing requests against these problematic\n
1151
+ \ URIs to be instrumented.\n\n Many thanks to Craig R Webster and Amir Yalon for
1152
+ their help with this issue!\n\n* More robust error collection from Resque processes\n\n
1153
+ \ Previously, traced errors where the exception class was defined in the Resque\n
1154
+ \ worker but not in the Resque master process would not be correctly handled by\n
1155
+ \ the agent. This has been fixed.\n\n* Allow Sinatra apps to set the New Relic environment
1156
+ without setting RACK_ENV\n\n The NEW_RELIC_ENV environment variable may now be
1157
+ used to specify the\n environment the agent should use from its configuration file,
1158
+ independently of\n RACK_ENV.\n\n Many thanks to Mario Izquierdo for the contribution!\n\n*
1159
+ Better error handling in Browser Application Monitoring injection\n\n The agent
1160
+ middleware that injects the JavaScript code necessary for Browser\n Application
1161
+ Monitoring now does a better job of catching errors that might\n occur during the
1162
+ injection process.\n\n* Allow disabling of Net::HTTP instrumentation\n\n Most instrumentation
1163
+ in the Ruby agent can be disabled easily via a\n configuration setting. Our Net::HTTP
1164
+ instrumentation was previously an\n exception, but now it can also be disabled
1165
+ with the disable_net_http\n configuration setting.\n\n* Make Rails constant presence
1166
+ check more defensive\n\n The Ruby agent now guards against the (rare) case where
1167
+ an application has a\n Rails constant defined, but no Rails::VERSION constant (because
1168
+ Rails is not\n actually present).\n\n Many thanks to Vladimir Kiselev for the
1169
+ contribution!\n\n See https://github.com/newrelic/rpm/blob/master/CHANGELOG for
1170
+ a full list of\n changes.\n"
1094
1171
  rdoc_options: []
1095
1172
  require_paths:
1096
1173
  - lib
metadata.gz.sig CHANGED
Binary file
@@ -1,20 +0,0 @@
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 'new_relic/agent/transaction_state'
6
-
7
- module NewRelic
8
- module Rack
9
- module TransactionReset
10
- RESET_KEY = "newrelic.transaction_reset".freeze
11
-
12
- def ensure_transaction_reset(env)
13
- return if env.has_key?(RESET_KEY)
14
-
15
- NewRelic::Agent::TransactionState.reset
16
- env[RESET_KEY] = true
17
- end
18
- end
19
- end
20
- end
@@ -1,42 +0,0 @@
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-927
6
-
7
- # Mongrel is only supported on older versions, so don't check for queue depth
8
- if Rails::VERSION::MAJOR.to_i < 4
9
-
10
- require './app'
11
- require 'ostruct'
12
-
13
- class MongrelController < ApplicationController
14
- include Rails.application.routes.url_helpers
15
-
16
- def deep
17
- respond_to do |format|
18
- format.html { render :text => "<html><head></head><body>Deep</body></html>" }
19
- end
20
- end
21
- end
22
-
23
- class MongrelQueueDepthTest < ActionDispatch::IntegrationTest
24
-
25
- include MultiverseHelpers
26
-
27
- setup_and_teardown_agent(:beacon => "beacon", :browser_key => "key")
28
-
29
- def test_mongrel_queue
30
- mongrel = OpenStruct.new(:workers => OpenStruct.new(:list => OpenStruct.new(:length => "10")))
31
- NewRelic::Control.instance.local_env.mongrel = mongrel
32
-
33
- get('/mongrel/deep')
34
-
35
- assert_metrics_recorded(['HttpDispatcher'])
36
- assert_metrics_recorded('Mongrel/Queue Length' => {:call_count => 1, :total_call_time => 9.0})
37
- assert_metrics_not_recorded(['WebFrontend/Mongrel/Average Queue Time'])
38
- end
39
-
40
- end
41
-
42
- end
@@ -1,35 +0,0 @@
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 File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
6
- require 'new_relic/rack/transaction_reset'
7
- require 'new_relic/agent/transaction_state'
8
-
9
- module NewRelic
10
- module Rack
11
- class TransactionResetTest < Minitest::Test
12
- class ExampleMiddleware
13
- include TransactionReset
14
- end
15
-
16
- attr_reader :middleware, :env
17
-
18
- def setup
19
- @middleware = ExampleMiddleware.new
20
- @env = {}
21
- end
22
-
23
- def test_resets
24
- NewRelic::Agent::TransactionState.expects(:reset).once
25
- middleware.ensure_transaction_reset(env)
26
- end
27
-
28
- def test_resets_only_once
29
- NewRelic::Agent::TransactionState.expects(:reset).once
30
- middleware.ensure_transaction_reset(env)
31
- middleware.ensure_transaction_reset(env)
32
- end
33
- end
34
- end
35
- end
@@ -1,3 +0,0 @@
1
-
2
- <h2>File: <%= @filename %></h2>
3
- <%= @source %>