newrelic_rpm 3.18.1.330 → 4.0.0.332

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -74
  3. data/CHANGELOG.md +77 -0
  4. data/CONTRIBUTING.md +14 -6
  5. data/LICENSE +1 -88
  6. data/lib/new_relic/agent.rb +2 -103
  7. data/lib/new_relic/agent/agent.rb +3 -32
  8. data/lib/new_relic/agent/commands/thread_profiler_session.rb +2 -6
  9. data/lib/new_relic/agent/configuration/default_source.rb +1 -8
  10. data/lib/new_relic/agent/configuration/yaml_source.rb +1 -12
  11. data/lib/new_relic/agent/cross_app_monitor.rb +2 -1
  12. data/lib/new_relic/agent/cross_app_tracing.rb +4 -2
  13. data/lib/new_relic/agent/datastores/mongo.rb +1 -1
  14. data/lib/new_relic/agent/datastores/redis.rb +1 -1
  15. data/lib/new_relic/agent/encoding_normalizer.rb +1 -20
  16. data/lib/new_relic/agent/error_collector.rb +8 -21
  17. data/lib/new_relic/agent/inbound_request_monitor.rb +4 -1
  18. data/lib/new_relic/agent/instrumentation/active_record_helper.rb +14 -30
  19. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +1 -1
  20. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +4 -5
  21. data/lib/new_relic/agent/instrumentation/curb.rb +2 -2
  22. data/lib/new_relic/agent/instrumentation/excon.rb +3 -3
  23. data/lib/new_relic/agent/instrumentation/grape.rb +3 -3
  24. data/lib/new_relic/agent/instrumentation/httpclient.rb +2 -2
  25. data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +2 -2
  26. data/lib/new_relic/agent/instrumentation/middleware_proxy.rb +2 -2
  27. data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +3 -7
  28. data/lib/new_relic/agent/instrumentation/queue_time.rb +13 -15
  29. data/lib/new_relic/agent/instrumentation/rack.rb +4 -50
  30. data/lib/new_relic/agent/instrumentation/rake.rb +1 -1
  31. data/lib/new_relic/agent/instrumentation/resque.rb +1 -2
  32. data/lib/new_relic/agent/instrumentation/sinatra.rb +0 -1
  33. data/lib/new_relic/agent/instrumentation/typhoeus.rb +2 -2
  34. data/lib/new_relic/agent/javascript_instrumentor.rb +3 -2
  35. data/lib/new_relic/agent/method_tracer.rb +1 -60
  36. data/lib/new_relic/agent/new_relic_service.rb +3 -2
  37. data/lib/new_relic/agent/new_relic_service/encoders.rb +5 -6
  38. data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +7 -16
  39. data/lib/new_relic/agent/pipe_channel_manager.rb +1 -3
  40. data/lib/new_relic/agent/pipe_service.rb +1 -3
  41. data/lib/new_relic/agent/rules_engine.rb +2 -17
  42. data/lib/new_relic/agent/stats_engine.rb +0 -2
  43. data/lib/new_relic/agent/stats_engine/metric_stats.rb +0 -48
  44. data/lib/new_relic/agent/supported_versions.rb +12 -19
  45. data/lib/new_relic/agent/threading/backtrace_service.rb +1 -1
  46. data/lib/new_relic/agent/transaction.rb +0 -3
  47. data/lib/new_relic/agent/transaction/attributes.rb +1 -10
  48. data/lib/new_relic/agent/vm.rb +1 -4
  49. data/lib/new_relic/agent/vm/jruby_vm.rb +1 -3
  50. data/lib/new_relic/agent/vm/mri_vm.rb +2 -10
  51. data/lib/new_relic/control.rb +1 -2
  52. data/lib/new_relic/control/frameworks/rails.rb +1 -1
  53. data/lib/new_relic/control/frameworks/rails3.rb +1 -2
  54. data/lib/new_relic/control/frameworks/rails4.rb +1 -1
  55. data/lib/new_relic/control/frameworks/rails5.rb +1 -1
  56. data/lib/new_relic/control/instance_methods.rb +1 -1
  57. data/{vendor/gems/dependency_detection-0.0.1.build/lib → lib/new_relic}/dependency_detection.rb +0 -1
  58. data/lib/new_relic/helper.rb +6 -13
  59. data/lib/new_relic/language_support.rb +44 -139
  60. data/lib/new_relic/metric_spec.rb +0 -17
  61. data/lib/new_relic/noticed_error.rb +18 -27
  62. data/lib/new_relic/version.rb +3 -48
  63. data/lib/tasks/versions.rake +7 -5
  64. data/newrelic_rpm.gemspec +1 -16
  65. data/test/agent_helper.rb +4 -2
  66. data/test/environments/lib/environments/runner.rb +5 -14
  67. data/test/environments/norails/Gemfile +0 -8
  68. data/test/environments/rails21/Gemfile +0 -8
  69. data/test/environments/rails21/config/database.yml +1 -1
  70. data/test/environments/rails22/Gemfile +0 -8
  71. data/test/environments/rails22/config/database.yml +1 -1
  72. data/test/environments/rails23/Gemfile +1 -7
  73. data/test/environments/rails23/config/database.yml +1 -1
  74. data/test/environments/rails30/Gemfile +0 -1
  75. data/test/environments/rails30/config/database.yml +1 -1
  76. data/test/environments/rails31/Gemfile +0 -3
  77. data/test/environments/rails31/config/database.yml +1 -1
  78. data/test/environments/rails32/Gemfile +0 -3
  79. data/test/environments/rails32/config/database.yml +1 -1
  80. data/test/environments/rails40/Gemfile +0 -26
  81. data/test/environments/rails40/config/database.yml +1 -1
  82. data/test/environments/rails41/Gemfile +0 -18
  83. data/test/environments/rails41/config/database.yml +1 -1
  84. data/test/environments/rails42/Gemfile +0 -22
  85. data/test/environments/rails42/config/database.yml +1 -1
  86. data/test/environments/rails50/Gemfile +0 -13
  87. data/test/environments/rails50/config/database.yml +1 -1
  88. data/test/helpers/logging.rb +37 -0
  89. data/test/helpers/minitest.rb +50 -0
  90. data/test/helpers/misc.rb +87 -0
  91. data/test/helpers/transaction_sample.rb +44 -0
  92. data/test/multiverse/lib/multiverse/suite.rb +6 -91
  93. data/test/multiverse/script/runner +1 -1
  94. data/test/multiverse/suites/active_record/Envfile +1 -28
  95. data/test/multiverse/suites/active_record/active_record_test.rb +6 -6
  96. data/test/multiverse/suites/active_record/config/database.rb +2 -3
  97. data/test/multiverse/suites/active_record/config/database.yml +0 -2
  98. data/test/multiverse/suites/activemerchant/Envfile +4 -18
  99. data/test/multiverse/suites/agent_only/encoding_handling_test.rb +7 -15
  100. data/test/multiverse/suites/agent_only/error_events_test.rb +1 -7
  101. data/test/multiverse/suites/agent_only/harvest_timestamps_test.rb +4 -20
  102. data/test/multiverse/suites/agent_only/labels_test.rb +1 -1
  103. data/test/multiverse/suites/agent_only/marshaling_test.rb +5 -10
  104. data/test/multiverse/suites/agent_only/script/public_api_when_disabled.rb +0 -11
  105. data/test/multiverse/suites/agent_only/start_up_test.rb +3 -3
  106. data/test/multiverse/suites/agent_only/synthetics_test.rb +1 -1
  107. data/test/multiverse/suites/agent_only/thread_profiling_test.rb +0 -3
  108. data/test/multiverse/suites/agent_only/xray_sessions_test.rb +0 -3
  109. data/test/multiverse/suites/capistrano/Envfile +2 -4
  110. data/test/multiverse/suites/capistrano2/Envfile +0 -4
  111. data/test/multiverse/suites/curb/Envfile +3 -7
  112. data/test/multiverse/suites/datamapper/Envfile +2 -2
  113. data/test/multiverse/suites/datamapper/datamapper_test.rb +2 -2
  114. data/test/multiverse/suites/deferred_instrumentation/sinatra_test.rb +0 -1
  115. data/test/multiverse/suites/delayed_job/Envfile +28 -41
  116. data/test/multiverse/suites/excon/Envfile +0 -3
  117. data/test/multiverse/suites/grape/Envfile +0 -4
  118. data/test/multiverse/suites/grape/grape_versioning_test.rb +2 -2
  119. data/test/multiverse/suites/grape/grape_versioning_test_api.rb +2 -2
  120. data/test/multiverse/suites/json/Envfile +1 -9
  121. data/test/multiverse/suites/marshalling/Envfile +0 -9
  122. data/test/multiverse/suites/memcached/Envfile +5 -23
  123. data/test/multiverse/suites/mongo/Envfile +9 -11
  124. data/test/multiverse/suites/padrino/Envfile +0 -6
  125. data/test/multiverse/suites/rack/http_response_code_test.rb +0 -1
  126. data/test/multiverse/suites/rack/rack_auto_instrumentation_test.rb +5 -10
  127. data/test/multiverse/suites/rack/rack_cascade_test.rb +0 -1
  128. data/test/multiverse/suites/rack/rack_env_mutation_test.rb +0 -1
  129. data/test/multiverse/suites/rack/response_content_type_test.rb +0 -1
  130. data/test/multiverse/suites/rails/Envfile +1 -19
  131. data/test/multiverse/suites/rails/activejob_test.rb +1 -2
  132. data/test/multiverse/suites/rails/error_tracing_test.rb +0 -13
  133. data/test/multiverse/suites/rails/gc_instrumentation_test.rb +12 -32
  134. data/test/multiverse/suites/rake/Envfile +15 -22
  135. data/test/multiverse/suites/redis/redis_instrumentation_test.rb +1 -1
  136. data/test/multiverse/suites/sequel/database.rb +1 -4
  137. data/test/multiverse/suites/sidekiq/Envfile +13 -23
  138. data/test/multiverse/suites/sinatra/sinatra_test_cases.rb +3 -3
  139. data/test/multiverse/suites/typhoeus/Envfile +0 -19
  140. data/test/multiverse/suites/typhoeus/typhoeus_test.rb +3 -3
  141. data/test/multiverse/suites/yajl/Envfile +5 -0
  142. data/test/multiverse/suites/yajl/yajl_test.rb +1 -3
  143. data/test/new_relic/agent/agent/start_test.rb +3 -3
  144. data/test/new_relic/agent/agent_logger_test.rb +2 -2
  145. data/test/new_relic/agent/agent_test.rb +2 -2
  146. data/test/new_relic/agent/attribute_processing_test.rb +3 -4
  147. data/test/new_relic/agent/audit_logger_test.rb +4 -6
  148. data/test/new_relic/agent/aws_info_test.rb +17 -1
  149. data/test/new_relic/agent/busy_calculator_test.rb +14 -16
  150. data/test/new_relic/agent/configuration/manager_test.rb +1 -7
  151. data/test/new_relic/agent/cross_app_monitor_test.rb +1 -1
  152. data/test/new_relic/agent/database_test.rb +2 -10
  153. data/test/new_relic/agent/datastores/mongo/event_formatter_test.rb +90 -93
  154. data/test/new_relic/agent/datastores/redis_test.rb +14 -16
  155. data/test/new_relic/agent/encoding_normalizer_test.rb +38 -40
  156. data/test/new_relic/agent/error_collector_test.rb +16 -49
  157. data/test/new_relic/agent/instrumentation/active_record_helper_test.rb +0 -6
  158. data/test/new_relic/agent/instrumentation/active_record_subscriber_test.rb +1 -1
  159. data/test/new_relic/agent/instrumentation/mongodb_command_subscriber_test.rb +101 -103
  160. data/test/new_relic/agent/instrumentation/rack_test.rb +11 -14
  161. data/test/new_relic/agent/instrumentation/task_instrumentation_test.rb +0 -10
  162. data/test/new_relic/agent/javascript_instrumentor_test.rb +2 -2
  163. data/test/new_relic/agent/method_tracer/class_methods/add_method_tracer_test.rb +0 -10
  164. data/test/new_relic/agent/method_tracer_test.rb +35 -76
  165. data/test/new_relic/agent/new_relic_service_test.rb +86 -102
  166. data/test/new_relic/agent/pipe_channel_manager_test.rb +4 -9
  167. data/test/new_relic/agent/pipe_service_test.rb +2 -3
  168. data/test/new_relic/agent/rpm_agent_test.rb +0 -4
  169. data/test/new_relic/agent/sampled_buffer_test.rb +2 -2
  170. data/test/new_relic/agent/samplers/cpu_sampler_test.rb +28 -0
  171. data/test/new_relic/agent/samplers/memory_sampler_test.rb +66 -0
  172. data/test/new_relic/agent/sized_buffer_test.rb +1 -1
  173. data/test/new_relic/agent/stats_engine/gc_profiler_test.rb +2 -14
  174. data/test/new_relic/agent/stats_engine/metric_stats_test.rb +44 -66
  175. data/test/new_relic/agent/stats_test.rb +6 -8
  176. data/test/new_relic/agent/synthetics_event_buffer_test.rb +1 -1
  177. data/test/new_relic/agent/transaction/attributes_test.rb +4 -12
  178. data/test/new_relic/agent/transaction_test.rb +2 -10
  179. data/test/new_relic/agent/utilization_data_test.rb +17 -1
  180. data/test/new_relic/agent/vm/mri_vm_test.rb +5 -7
  181. data/test/new_relic/agent_test.rb +0 -43
  182. data/test/new_relic/coerce_test.rb +1 -3
  183. data/test/new_relic/fake_collector.rb +3 -3
  184. data/test/new_relic/fake_external_server.rb +1 -1
  185. data/test/new_relic/fake_server.rb +1 -1
  186. data/test/new_relic/http_client_test_cases.rb +3 -3
  187. data/test/new_relic/language_support_test.rb +6 -12
  188. data/test/new_relic/latest_changes_test.rb +0 -11
  189. data/test/new_relic/license_test.rb +3 -8
  190. data/test/new_relic/multiverse_helpers.rb +1 -1
  191. data/test/new_relic/noticed_error_test.rb +11 -7
  192. data/test/new_relic/rack/browser_monitoring_test.rb +1 -3
  193. data/test/nullverse/nullverse_helper.rb +1 -1
  194. data/test/performance/lib/performance.rb +1 -1
  195. data/test/performance/lib/performance/instrumentation/gc_stats.rb +4 -6
  196. data/test/performance/lib/performance/instrumentation/perf_tools.rb +1 -1
  197. data/test/performance/lib/performance/instrumentation/stackprof.rb +1 -1
  198. data/test/performance/lib/performance/platform.rb +1 -8
  199. data/test/performance/script/runner +1 -3
  200. data/test/performance/suites/active_record.rb +3 -24
  201. data/test/test_helper.rb +9 -216
  202. metadata +9 -45
  203. data/lib/conditional_vendored_dependency_detection.rb +0 -7
  204. data/lib/new_relic/agent/hash_extensions.rb +0 -41
  205. data/lib/new_relic/agent/instrumentation/metric_frame.rb +0 -39
  206. data/lib/new_relic/agent/instrumentation/rails/errors.rb +0 -51
  207. data/lib/new_relic/agent/instrumentation/rails3/errors.rb +0 -47
  208. data/lib/new_relic/agent/instrumentation/rails4/errors.rb +0 -46
  209. data/lib/new_relic/agent/stats_engine/samplers.rb +0 -22
  210. data/lib/new_relic/agent/vm/rubinius_vm.rb +0 -140
  211. data/lib/new_relic/json_wrapper.rb +0 -78
  212. data/lib/new_relic/okjson.rb +0 -602
  213. data/lib/new_relic/rack/error_collector.rb +0 -27
  214. data/lib/new_relic/timer_lib.rb +0 -31
  215. data/test/helpers/runtime_detection.rb +0 -17
  216. data/test/multiverse/suites/no_json/Envfile +0 -12
  217. data/test/multiverse/suites/no_json/config/newrelic.yml +0 -27
  218. data/test/multiverse/suites/no_json/marshal_config_test.rb +0 -22
  219. data/test/new_relic/agent/hash_extensions_test.rb +0 -59
  220. data/test/new_relic/agent/instrumentation/metric_frame_test.rb +0 -22
  221. data/test/new_relic/agent/stats_engine/samplers_test.rb +0 -98
  222. data/test/new_relic/agent/vm/rubinius_vm_test.rb +0 -69
  223. data/test/new_relic/json_wrapper_test.rb +0 -32
  224. data/test/new_relic/rack/deferred_instrumentation_test.rb +0 -33
  225. data/test/new_relic/rack/error_collector_test.rb +0 -83
  226. data/test/new_relic/version_number_test.rb +0 -101
  227. data/test/script/before_install/revert_rubygems.sh +0 -15
  228. data/test/script/before_install/update_bundler.sh +0 -12
  229. data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection/version.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aea433d0e5dddee05b76a21d682702ef9b6858e1
4
- data.tar.gz: f9bd9e91d487865e5d33630eda81c49cadb29757
3
+ metadata.gz: 6f033acf8bf5efe89fd548f55aba3e3b7b9c58e2
4
+ data.tar.gz: 0e523aeaaca318f6bf863c4f7b9269d4b212f63a
5
5
  SHA512:
6
- metadata.gz: 41eb55392a0eb008ef66bd77979e15cd45617536cbe81e331a36cf86a1f1606301250bb538b2b48049b057818116e90bc8e5bf5d1c4d191c4225b240bc99d506
7
- data.tar.gz: 537960507a71710172aaa29442595c172559921fe7ee8c4c071a1f864e7f7e4917042c10442decd3a169008abf3ebce2755d1432c418eab519d1e7c3ae7ed9b8
6
+ metadata.gz: 9b18921ad5e63244778c06a6d45fcf7fa556a19cac8eb61f58cdfce341033ea87c9e9c3eb1832c8c5c3dd4ce9ad30030340497772c5a1144bfd408b2be0dfd0e
7
+ data.tar.gz: 809cc815755c0d2be8555ac9e8bec2d057a849617e196e62644131588d7c8a697f19f1e91a1f73f0c4ace692efbd1d7ece2ce7996548a2f1828c7cd56b0649a9
@@ -8,10 +8,8 @@ language: ruby
8
8
  sudo: required
9
9
 
10
10
  before_install:
11
- - ./test/script/before_install/revert_rubygems.sh
12
11
  - gem --version
13
12
  - ./test/script/before_install/gemstash_mirror.sh
14
- - ./test/script/before_install/update_bundler.sh
15
13
  - bundle --version
16
14
 
17
15
  install: bundle install
@@ -33,18 +31,12 @@ notifications:
33
31
 
34
32
  rvm:
35
33
  # Run slowest builds first to try and optimize overall cycle time.
36
- - jruby-1.7.23
37
34
  - jruby-9.1.2.0
38
35
  - 2.4.0
39
36
  - 2.3.3
40
37
  - 2.2.6
41
38
  - 2.1.10
42
39
  - 2.0.0-p648
43
- - 1.9.3
44
- - 1.9.2
45
- - ree
46
- - 1.8.7
47
- - rbx-2.5.8
48
40
 
49
41
  env:
50
42
  global:
@@ -57,9 +49,11 @@ env:
57
49
  - TESTOPTS="-v"
58
50
  - VERBOSE = 1
59
51
  matrix:
52
+ # RUBY-1668 rails21, rails22, and rails23 are all excluded below
60
53
  - TYPE=UNIT ENVIRONMENT=rails21
61
54
  - TYPE=UNIT ENVIRONMENT=rails22
62
55
  - TYPE=UNIT ENVIRONMENT=rails23
56
+
63
57
  - TYPE=UNIT ENVIRONMENT=rails30
64
58
  - TYPE=UNIT ENVIRONMENT=rails31
65
59
  - TYPE=UNIT ENVIRONMENT=rails32
@@ -81,14 +75,8 @@ env:
81
75
  - TYPE=NULLVERSE
82
76
 
83
77
  matrix:
84
- allow_failures:
85
- - rvm: rbx-2.5.8
86
- - rvm: ree
87
78
  fast_finish: true
88
79
  exclude:
89
- - rvm: rbx-2.5.8 # Currently hangs
90
- env: TYPE=FUNCTIONAL GROUP=agent
91
-
92
80
  # Unsupported Rails/Ruby combinations
93
81
  # 2.4
94
82
  - rvm: 2.4.0
@@ -146,52 +134,6 @@ matrix:
146
134
  - rvm: 2.0.0-p648
147
135
  env: TYPE=UNIT ENVIRONMENT=rails50
148
136
 
149
- # 1.9.3
150
- - rvm: 1.9.3
151
- env: TYPE=UNIT ENVIRONMENT=rails21
152
- - rvm: 1.9.3
153
- env: TYPE=UNIT ENVIRONMENT=rails22
154
- - rvm: 1.9.3
155
- env: TYPE=UNIT ENVIRONMENT=rails50
156
-
157
- # 1.9.2
158
- - rvm: 1.9.2
159
- env: TYPE=UNIT ENVIRONMENT=rails21
160
- - rvm: 1.9.2
161
- env: TYPE=UNIT ENVIRONMENT=rails22
162
- - rvm: 1.9.2
163
- env: TYPE=UNIT ENVIRONMENT=rails50
164
-
165
- # REE
166
- - rvm: ree
167
- env: TYPE=UNIT ENVIRONMENT=rails40
168
- - rvm: ree
169
- env: TYPE=UNIT ENVIRONMENT=rails41
170
- - rvm: ree
171
- env: TYPE=UNIT ENVIRONMENT=rails42
172
- - rvm: ree
173
- env: TYPE=UNIT ENVIRONMENT=rails50
174
-
175
- # 1.8.7
176
- - rvm: 1.8.7
177
- env: TYPE=UNIT ENVIRONMENT=rails40
178
- - rvm: 1.8.7
179
- env: TYPE=UNIT ENVIRONMENT=rails41
180
- - rvm: 1.8.7
181
- env: TYPE=UNIT ENVIRONMENT=rails42
182
- - rvm: 1.8.7
183
- env: TYPE=UNIT ENVIRONMENT=rails50
184
-
185
- # jruby 1.7
186
- - rvm: jruby-1.7.23
187
- env: TYPE=UNIT ENVIRONMENT=rails21
188
- - rvm: jruby-1.7.23
189
- env: TYPE=UNIT ENVIRONMENT=rails22
190
- - rvm: jruby-1.7.23
191
- env: TYPE=UNIT ENVIRONMENT=rails23
192
- - rvm: jruby-1.7.23
193
- env: TYPE=UNIT ENVIRONMENT=rails50
194
-
195
137
  # jruby 9.0
196
138
  - rvm: jruby-9.1.2.0
197
139
  env: TYPE=UNIT ENVIRONMENT=rails21
@@ -205,17 +147,3 @@ matrix:
205
147
  env: TYPE=UNIT ENVIRONMENT=rails31
206
148
  - rvm: jruby-9.1.2.0
207
149
  env: TYPE=UNIT ENVIRONMENT=rails32
208
-
209
- # rbx
210
- - rvm: rbx-2.5.8
211
- env: TYPE=UNIT ENVIRONMENT=rails21
212
- - rvm: rbx-2.5.8
213
- env: TYPE=UNIT ENVIRONMENT=rails22
214
- - rvm: rbx-2.5.8
215
- env: TYPE=UNIT ENVIRONMENT=rails23
216
- - rvm: rbx-2.5.8
217
- env: TYPE=UNIT ENVIRONMENT=rails30
218
- - rvm: rbx-2.5.8
219
- env: TYPE=UNIT ENVIRONMENT=rails31
220
- - rvm: rbx-2.5.8
221
- env: TYPE=UNIT ENVIRONMENT=rails32
@@ -1,5 +1,80 @@
1
1
  # New Relic Ruby Agent Release Notes #
2
2
 
3
+ ## v4.0.0 ##
4
+
5
+ * Require Ruby 2.0.0+
6
+
7
+ The agent no longer supports Ruby versions prior to 2.0, JRuby 1.7 and
8
+ earlier, and all versions of Rubinius. Customers using affected Rubies
9
+ can continue to run 3.x agent versions, but new features or bugfixes
10
+ will not be published for 3.x agents. For more information, check out our
11
+ [community forum](https://discuss.newrelic.com/t/support-for-ruby-jruby-1-x-is-being-deprecated-in-ruby-agent-4-0-0/44787).
12
+
13
+ * OkJson vendored library removed
14
+
15
+ Ruby 1.8 did not include the JSON gem by default, so the agent included a
16
+ vendored version of [OkJson](https://github.com/kr/okjson) that it would fall
17
+ back on using in cases where the JSON gem was not available. This has been
18
+ removed.
19
+
20
+ * YAJL workaround removed
21
+
22
+ [yajl-ruby](https://github.com/brianmario/yajl-ruby) versions prior to 1.2 had
23
+ the potential to cause a segmentation fault when working large, deeply-nested
24
+ objects like thread profiles. If you are using yajl-ruby with the `JSON`
25
+ monkey patches enabled by requiring `yajl/json_gem`, you should upgrade to
26
+ at least version 1.2.
27
+
28
+ * Deprecated APIs removed
29
+
30
+ * `Agent.abort_transaction!`
31
+ * `Agent.add_custom_parameters`
32
+ * `Agent.add_request_parameters`
33
+ * `Agent.browser_timing_footer`
34
+ * `Agent.get_stats`
35
+ * `Agent.get_stats_no_scope`
36
+ * `Agent.record_transaction`
37
+ * `Agent.reset_stats`
38
+ * `Agent.set_user_attributes`
39
+ * `Agent::Instrumentation::Rack`
40
+ * `ActionController#newrelic_notice_error`
41
+ * `ActiveRecordHelper.rollup_metrics_for` (may be incompatible with newrelic_moped)
42
+ * `Instrumentation::MetricFrame.recording_web_transaction?`
43
+ * `Instrumentation::MetricFrame.abort_transaction!`
44
+ * `MethodTracer.get_stats_scoped`
45
+ * `MethodTracer.get_stats_unscoped`
46
+ * `MethodTracer.trace_method_execution`
47
+ * `MethodTracer.trace_method_execution_no_scope`
48
+ * `MethodTracer.trace_method_execution_with_scope`
49
+ * `MetricSpec#sub`
50
+ * `MetricStats#get_stats`
51
+ * `MetricStats#get_stats_no_scope`
52
+ * `NoticedError#exception_class`
53
+ * `Rack::ErrorCollector`
54
+ * `StatsEngine::Samplers.add_sampler`
55
+ * `StatsEngine::Samplers.add_harvest_sampler`
56
+
57
+ The above methods have had deprecation notices on them for some time and
58
+ have now been removed. Assistance migrating usage of these APIs is
59
+ available at https://docs.newrelic.com/node/2601.
60
+
61
+ The agent no longer deletes deprecated keys passed to `add_method_tracer`. Passing
62
+ in deprecated keys can cause an exception. Ensure that you are not passing any of
63
+ the following keys: `:force, :scoped_metric_only, :deduct_call_time_from_parent`
64
+ to `add_method_tracer`.
65
+
66
+ The agent no longer deletes deprecated keys passed in as options to
67
+ `NewRelic::Agent.notice_error`. If you are passing any of these deprecated
68
+ keys: `:request_params, :request, :referer` to the `notice_error` API, please
69
+ delete them otherwise they will be collected as custom attributes.
70
+
71
+ * Error handling changes
72
+
73
+ The agent now only checks for `original_exception` in environments with Rails
74
+ versions prior to 5. Checking for `Exception#cause` has been removed. In addition,
75
+ the agent now will match class name with message and backtrace when noticing
76
+ errors that have an `original_exception`.
77
+
3
78
  ## v3.18.1 ##
4
79
 
5
80
  * Ensure Mongo aggregate queries are properly obfuscated
@@ -11,6 +86,8 @@
11
86
  encouraged to turn off query collection using by setting
12
87
  `mongo.capture_queries` to false in their newrelic.yml files.
13
88
 
89
+ This release fixes [New Relic Security Bulletin NR17-03](https://docs.newrelic.com/docs/accounts-partnerships/accounts/security-bulletins/security-bulletin-nr17-03).
90
+
14
91
  * Early access Redis 4.0 instrumentation
15
92
 
16
93
  Our Redis instrumentation has been tested against Redis 4.0.0.rc1.
@@ -5,15 +5,23 @@ taken effort to make this process easy for both contributors and our development
5
5
  team.
6
6
 
7
7
  When contributing, keep in mind that the agent runs in a wide variety of Ruby
8
- language implementations (e.g. 1.8.7, 1.9.x, 2.x.x, jruby, rbx, etc.) as well as
9
- a wide variety of application environments (e.g. Rails, Sinatra, roll-your-own,
10
- etc.) See https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/new-relic-ruby#compat
8
+ language implementations (e.g. 2.x.x, jruby, etc.) as well as a wide variety of
9
+ application environments (e.g. Rails, Sinatra, roll-your-own, etc.) See
10
+ https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks
11
11
  for the current full list.
12
12
 
13
13
  Because of this, we need to be more defensive in our coding practices than most
14
- projects. Syntax must be compatible with all supported Ruby implementations
15
- (e.g. no 1.9 specific hash syntax) and we can't assume the presence of any
16
- specific libraries, including `ActiveSupport`, `ActiveRecord`, etc.
14
+ projects. Syntax must be compatible with all supported Ruby implementations and
15
+ we can't assume the presence of any specific libraries, including `ActiveSupport`,
16
+ `ActiveRecord`, etc.
17
+
18
+ ## Branches
19
+
20
+ The head of master will generally have New Relic's latest release. However,
21
+ New Relic reserves the ability to push an edge to the master. If you download a
22
+ release from this repo, use the appropriate tag. New Relic usually pushes beta
23
+ versions of a release to a working branch before tagging them for General
24
+ Availability.
17
25
 
18
26
  ## Testing
19
27
 
data/LICENSE CHANGED
@@ -23,96 +23,9 @@ See https://github.com/jquery/jquery/blob/1.4.2/MIT-LICENSE.txt
23
23
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
24
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
25
 
26
- It includes source derived from 'okjson' by Keith Rarick, distributed under the
27
- MIT license.
28
- See https://github.com/kr/okjson/blob/bdd1113/okjson.rb#L3-21
29
-
30
- Copyright 2011, 2012 Keith Rarick
31
-
32
- Permission is hereby granted, free of charge, to any person obtaining a copy
33
- of this software and associated documentation files (the "Software"), to deal
34
- in the Software without restriction, including without limitation the rights
35
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
- copies of the Software, and to permit persons to whom the Software is
37
- furnished to do so, subject to the following conditions:
38
-
39
- The above copyright notice and this permission notice shall be included in
40
- all copies or substantial portions of the Software.
41
-
42
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
48
- THE SOFTWARE.
49
-
50
- It includes source derived from 'system_timer' by David Vollbracht & Philippe
51
- Hanrigou, distributed under Ruby's license terms.
52
-
53
- Copyright: (C) 2008 David Vollbracht & Philippe Hanrigou
54
-
55
- Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>.
56
- You can redistribute it and/or modify it under either the terms of the GPL
57
- (see COPYING.txt file), or the conditions below:
58
-
59
- 1. You may make and give away verbatim copies of the source form of the
60
- software without restriction, provided that you duplicate all of the
61
- original copyright notices and associated disclaimers.
62
-
63
- 2. You may modify your copy of the software in any way, provided that
64
- you do at least ONE of the following:
65
-
66
- a) place your modifications in the Public Domain or otherwise
67
- make them Freely Available, such as by posting said
68
- modifications to Usenet or an equivalent medium, or by allowing
69
- the author to include your modifications in the software.
70
-
71
- b) use the modified software only within your corporation or
72
- organization.
73
-
74
- c) rename any non-standard executables so the names do not conflict
75
- with standard executables, which must also be provided.
76
-
77
- d) make other distribution arrangements with the author.
78
-
79
- 3. You may distribute the software in object code or executable
80
- form, provided that you do at least ONE of the following:
81
-
82
- a) distribute the executables and library files of the software,
83
- together with instructions (in the manual page or equivalent)
84
- on where to get the original distribution.
85
-
86
- b) accompany the distribution with the machine-readable source of
87
- the software.
88
-
89
- c) give non-standard executables non-standard names, with
90
- instructions on where to get the original software distribution.
91
-
92
- d) make other distribution arrangements with the author.
93
-
94
- 4. You may modify and include the part of the software into any other
95
- software (possibly commercial). But some files in the distribution
96
- are not written by the author, so that they are not under this terms.
97
-
98
- They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some
99
- files under the ./missing directory. See each file for the copying
100
- condition.
101
-
102
- 5. The scripts and library files supplied as input to or produced as
103
- output from the software do not automatically fall under the
104
- copyright of the software, but belong to whomever generated them,
105
- and may be sold commercially, and may be aggregated with this
106
- software.
107
-
108
- 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
109
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
110
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
111
- PURPOSE.
112
-
113
26
 
114
27
  All other components of this product are
115
- Copyright (c) 2008-2015 New Relic, Inc. All rights reserved.
28
+ Copyright (c) 2008-2017 New Relic, Inc. All rights reserved.
116
29
 
117
30
  Certain inventions disclosed in this file may be claimed within
118
31
  patents owned or patent applications filed by New Relic, Inc. or third
@@ -31,8 +31,8 @@ module NewRelic
31
31
  require 'new_relic/metric_data'
32
32
  require 'new_relic/collection_helper'
33
33
  require 'new_relic/noticed_error'
34
- require 'new_relic/timer_lib'
35
34
 
35
+ require 'new_relic/agent/encoding_normalizer'
36
36
  require 'new_relic/agent/stats'
37
37
  require 'new_relic/agent/chained_call'
38
38
  require 'new_relic/agent/cross_app_monitor'
@@ -56,9 +56,6 @@ module NewRelic
56
56
 
57
57
  require 'new_relic/agent/instrumentation/controller_instrumentation'
58
58
 
59
- # this is a shim that's here only for backwards compatibility
60
- require 'new_relic/agent/instrumentation/metric_frame'
61
-
62
59
  require 'new_relic/agent/samplers/cpu_sampler'
63
60
  require 'new_relic/agent/samplers/memory_sampler'
64
61
  require 'new_relic/agent/samplers/object_sampler'
@@ -369,8 +366,7 @@ module NewRelic
369
366
  #
370
367
  # @api public
371
368
  def require_test_helper
372
- path = File.join(__FILE__, '..', '..', '..', 'test', 'agent_helper')
373
- require File.expand_path(path)
369
+ require File.expand_path('../../../test/agent_helper', __FILE__)
374
370
  end
375
371
 
376
372
  # This method sets the block sent to this method as a sql
@@ -624,103 +620,6 @@ module NewRelic
624
620
 
625
621
  # @!endgroup
626
622
 
627
- # @!group Deprecated methods
628
-
629
- # In previous agent releases, this method was required for manual RUM
630
- # instrumentation. That work is now all done by the browser_timing_header
631
- # method, but this is left for compatibility.
632
- #
633
- # @api public
634
- # @deprecated
635
- #
636
- def browser_timing_footer
637
- ""
638
- end
639
-
640
- ADD_CUSTOM_ATTRIBUTES = "NewRelic::Agent.add_custom_attributes".freeze
641
- ADD_CUSTOM_PARAMETERS = "NewRelic::Agent.add_custom_parameters".freeze
642
- ADD_REQUEST_PARAMETERS = "NewRelic::Agent.add_request_parameters".freeze
643
- SET_USER_ATTRIBUTES = "NewRelic::Agent.set_user_attributes".freeze
644
-
645
- # Deprecated. Use add_custom_attributes instead.
646
- #
647
- # @deprecated
648
- # @api public
649
- #
650
- def add_custom_parameters(*args)
651
- NewRelic::Agent::Deprecator.deprecate(ADD_CUSTOM_PARAMETERS, ADD_CUSTOM_ATTRIBUTES)
652
- add_custom_attributes(*args)
653
- end
654
-
655
- # Deprecated. Use add_custom_attributes instead.
656
- #
657
- # @deprecated
658
- # @api public
659
- #
660
- def add_request_parameters(*args)
661
- NewRelic::Agent::Deprecator.deprecate(ADD_REQUEST_PARAMETERS, ADD_CUSTOM_ATTRIBUTES)
662
- add_custom_attributes(*args)
663
- end
664
-
665
- # Deprecated. Use add_custom_attributes instead.
666
- #
667
- # @deprecated
668
- # @api public
669
- #
670
- def set_user_attributes(*args)
671
- NewRelic::Agent::Deprecator.deprecate(SET_USER_ATTRIBUTES, ADD_CUSTOM_ATTRIBUTES)
672
- add_custom_attributes(*args)
673
- end
674
-
675
- # Get or create a statistics gatherer that will aggregate numerical data
676
- # under a metric name.
677
- #
678
- # +metric_name+ should follow a slash separated path convention. Application
679
- # specific metrics should begin with "Custom/".
680
- #
681
- # Return a NewRelic::Agent::Stats that accepts data
682
- # via calls to add_data_point(value).
683
- #
684
- # This method is deprecated in favor of record_metric and increment_metric,
685
- # and is not thread-safe.
686
- #
687
- # @api public
688
- # @deprecated
689
- #
690
- def get_stats(metric_name, use_scope=false)
691
- return unless agent
692
- agent.stats_engine.get_stats(metric_name, use_scope)
693
- end
694
-
695
- alias get_stats_no_scope get_stats
696
-
697
- # Deprecated in favor of drop_buffered_data
698
- #
699
- # @api public
700
- # @deprecated
701
- def reset_stats; drop_buffered_data; end
702
-
703
- # Cancel the collection of the current transaction in progress, if
704
- # any. Only affects the transaction started on this thread once
705
- # it has started and before it has completed.
706
- #
707
- # This method has been deprecated in favor of ignore_transaction,
708
- # which does what people expect this method to do.
709
- #
710
- # @api public
711
- # @deprecated
712
- #
713
- def abort_transaction!
714
- Transaction.abort_transaction!
715
- end
716
-
717
- # Remove after 5/9/15
718
- def record_transaction(*args)
719
- NewRelic::Agent.logger.warn('This method has been deprecated, please see https://docs.newrelic.com/docs/ruby/ruby-agent-api for current API documentation.')
720
- end
721
-
722
- # @!endgroup
723
-
724
623
  def_delegator :'NewRelic::Agent::PipeChannelManager', :register_report_channel
725
624
  end
726
625
  end