newrelic_rpm 8.12.0 → 8.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/.rubocop_todo.yml +14 -7
  4. data/CHANGELOG.md +33 -0
  5. data/README.md +1 -1
  6. data/lib/new_relic/agent/agent_logger.rb +1 -1
  7. data/lib/new_relic/agent/audit_logger.rb +1 -1
  8. data/lib/new_relic/agent/configuration/default_source.rb +1403 -1369
  9. data/lib/new_relic/agent/configuration/environment_source.rb +2 -2
  10. data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +1 -1
  11. data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +1 -1
  12. data/lib/new_relic/agent/instrumentation/active_merchant.rb +0 -2
  13. data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +0 -2
  14. data/lib/new_relic/agent/instrumentation/authlogic.rb +0 -2
  15. data/lib/new_relic/agent/instrumentation/data_mapper.rb +0 -1
  16. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +0 -2
  17. data/lib/new_relic/agent/instrumentation/excon.rb +17 -0
  18. data/lib/new_relic/agent/instrumentation/rack/chain.rb +10 -2
  19. data/lib/new_relic/agent/instrumentation/rack/prepend.rb +9 -2
  20. data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +0 -1
  21. data/lib/new_relic/agent/instrumentation/redis/chain.rb +18 -6
  22. data/lib/new_relic/agent/instrumentation/redis/constants.rb +17 -0
  23. data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +28 -18
  24. data/lib/new_relic/agent/instrumentation/redis/middleware.rb +16 -0
  25. data/lib/new_relic/agent/instrumentation/redis/prepend.rb +6 -0
  26. data/lib/new_relic/agent/instrumentation/redis.rb +6 -0
  27. data/lib/new_relic/agent/instrumentation/sidekiq/client.rb +20 -0
  28. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +30 -0
  29. data/lib/new_relic/agent/instrumentation/sidekiq/server.rb +37 -0
  30. data/lib/new_relic/agent/instrumentation/sidekiq.rb +6 -70
  31. data/lib/new_relic/agent/instrumentation/sinatra.rb +0 -2
  32. data/lib/new_relic/agent/instrumentation/sunspot.rb +0 -2
  33. data/lib/new_relic/agent/method_tracer_helpers.rb +1 -1
  34. data/lib/new_relic/agent/parameter_filtering.rb +7 -1
  35. data/lib/new_relic/agent/tracer.rb +1 -1
  36. data/lib/new_relic/constants.rb +2 -0
  37. data/lib/new_relic/control/instrumentation.rb +4 -8
  38. data/lib/new_relic/local_environment.rb +1 -1
  39. data/lib/new_relic/rack/browser_monitoring.rb +1 -0
  40. data/lib/new_relic/version.rb +1 -1
  41. data/lib/tasks/helpers/prompt.rb +1 -1
  42. data/lib/tasks/instrumentation_generator/README.md +2 -2
  43. data/lib/tasks/instrumentation_generator/TODO.md +5 -5
  44. data/newrelic_rpm.gemspec +1 -1
  45. data/test/agent_helper.rb +18 -0
  46. metadata +9 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b512b5154279638e712582a488b0021e9aa834163183b3172e8489701bdcc0c
4
- data.tar.gz: d44c55615a3b25be8900bf565ed29f5270be9bf6905f163f4bce9865610526cb
3
+ metadata.gz: 80f041d194a8a205c71293c88db7e0a35af051a9c318bc17aa7f6e16480f43a8
4
+ data.tar.gz: e7ffe3faef8538ed09feab8e416bfa28cbf82af31a5ae518c518c8540bcd8a01
5
5
  SHA512:
6
- metadata.gz: 861c112f97dd3c843127264c3a50a34f5601a50addd7378ceec59c8663e58130d5da152f89e2e91cb47ccc6b70cc56f7ad22484357597c4d4b5ae08d01687142
7
- data.tar.gz: 584f780e7fdc1029b1d97494a545f488c627c59e3fe1a5729cb7f8f3463ad1cf969ada3f77dbf01c1e4e53fa2c84189a88e22f59c1e1d0ab9abfeb8a00d3fbc9
6
+ metadata.gz: 46a30273eca12890d0800f6959c90dc80a77097f1f6b64bb7d7d77efbdf1ee758cf8aa1c3f9da2537d5ddd64c4a996aea39d7f2c0ca1daebe8583f62605bfb0a
7
+ data.tar.gz: a9002651aa6822c657ba3928121e06cad319d1650bb891feb26c8c7f055c4e5249a9bf9e44daf69bc0b89ed26f4192d380084942aed75288c1fc3fa443eb8e93
data/.rubocop.yml CHANGED
@@ -1334,6 +1334,7 @@ Style/MethodCallWithArgsParentheses:
1334
1334
  - include
1335
1335
  - print
1336
1336
  - puts
1337
+ - pp
1337
1338
  - raise
1338
1339
  - require
1339
1340
  - skip
data/.rubocop_todo.yml CHANGED
@@ -14,15 +14,9 @@ Metrics/AbcSize:
14
14
  - test/**/*
15
15
  - infinite_tracing/test/**/*
16
16
 
17
- # Offense count: 145
18
17
  # This cop supports safe autocorrection (--autocorrect).
19
18
  Minitest/AssertInDelta:
20
- Enabled: false
21
-
22
- # Offense count: 145
23
- # This cop supports safe autocorrection (--autocorrect).
24
- Minitest/AssertPredicate:
25
- Enabled: false
19
+ Enabled: true
26
20
 
27
21
  # Offense count: 7
28
22
  Minitest/AssertRaisesCompoundBody:
@@ -50,3 +44,16 @@ Minitest/RefutePredicate:
50
44
  # This cop supports safe autocorrection (--autocorrect).
51
45
  Minitest/TestMethodName:
52
46
  Enabled: false
47
+
48
+ Minitest/RefuteRespondTo:
49
+ Exclude:
50
+ - 'test/new_relic/cli/commands/deployments_test.rb'
51
+
52
+ Minitest/EmptyLineBeforeAssertionMethods:
53
+ Exclude:
54
+ - 'test/new_relic/agent_test.rb'
55
+ - 'test/new_relic/cli/commands/deployments_test.rb'
56
+
57
+ Style/RedundantStringEscape:
58
+ Exclude:
59
+ - 'test/new_relic/agent/logging_test.rb'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # New Relic Ruby Agent Release Notes #
2
2
 
3
+ ## v8.13.0
4
+
5
+ Version 8.13.0 of the agent updates our Rack, Redis, and Sidekiq instrumentation. It also delivers some bugfixes.
6
+
7
+ * **Support for Redis v5.0**
8
+
9
+ Redis v5.0 restructures where some of our instrumented methods are located and how they are named. It also introduces a new [instrumentation middleware API](https://github.com/redis-rb/redis-client#instrumentation-and-middlewares). This API is used for pipelined and multi calls to maintain reporting parity with previous Redis versions. However, it is introduced later in the chain, so you may see errors that used to appear at the segment level on the transaction instead. The agent's behavior when used with older supported Redis versions will remain unaffected. [PR#1611](https://github.com/newrelic/newrelic-ruby-agent/pull/1611)
10
+
11
+ * **Support for Sidekiq v7.0**
12
+
13
+ Sidekiq v7.0 removed Delayed Extensions and began offering client and server [middleware](https://github.com/mperham/sidekiq/blob/main/docs/middleware.md) classes to inherit from. The agent's Sidekiq instrumentation has been updated accordingly. The agent's behavior when used with older Sidekiq versions will remain unaffected. [PR#1615](https://github.com/newrelic/newrelic-ruby-agent/pull/1615)
14
+
15
+ * **Support for Rack v3.0: Rack::Builder#new accepting a block**
16
+
17
+ Via [rack/rack#1942](https://github.com/rack/rack/pull/1942) (released with Rack v3.0), `Rack::Builder#run` now optionally accepts a block instead of an app argument. The agent's instrumentation has been updated to support the use of a block with `Rack::Builder#run`. [PR#1600](https://github.com/newrelic/newrelic-ruby-agent/pull/1600)
18
+
19
+ * **Bugfix: Correctly identify Unicorn, Rainbows and FastCGI with Rack v3.0**
20
+
21
+ Unicorn, Rainbows, or FastCGI web applications using Rack v3.0 may previously have had the "dispatcher" value incorrectly reported as "Webrick" instead of "Unicorn", "Rainbows", or "FastCGI". This issue has now been addressed. [PR#1585](https://github.com/newrelic/newrelic-ruby-agent/pull/1585)
22
+
23
+ * **Bugfix: add_method_tracer fails to record code level metric attributes on private methods**
24
+
25
+ When using `add_method_tracer` on a private method, the agent was unable to record code level metrics for the method. This resulted in the following being logged to the newrelic_agent.log file.
26
+ ```
27
+ WARN : Unable to determine source code info for 'Example', method 'private_method' - NameError: undefined method 'private_method' for class '#<Class:Example>'
28
+ ```
29
+ Thank you [@jdelStrother](https://github.com/jdelStrother) for bringing this issue to our attention and suggesting a fix! [PR#1593](https://github.com/newrelic/newrelic-ruby-agent/pull/1593)
30
+
31
+
32
+ * **Bugfix: Category is a required keyword arg for NewRelic::Agent::Tracer.in_transaction**
33
+
34
+ When support for Ruby 2.0 was dropped in version 8.0.0 of the agent, the agent API methods were updated to use the required keyword argument feature built into Ruby, rather than manually raising ArgumentErrors. The API method `NewRelic::Agent::Tracer.in_transaction` removed the ArgumentError raised by the agent, but did not update the method arguments to identify `:category` as a required keyword argument. This is now resolved. Thank you [@tatzsuzuki](https://github.com/tatzsuzuki) for bringing this to our attention. [PR#1587](https://github.com/newrelic/newrelic-ruby-agent/pull/1587)
35
+
3
36
  ## v8.12.0
4
37
 
5
38
  Version 8.12.0 of the agent delivers new Elasticsearch instrumentation, increases the default number of recorded Custom Events, announces the deprecation of Ruby 2.3, and brings some valuable code cleanup.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Blue banner - Community Plus: This code is currently maintained by New Relic engineering teams and delivered here in GitHub. See the README for troubleshooting and defect reporting instructions.](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)
1
+ [![Blue banner - Community Plus: This code is currently maintained by New Relic engineering teams and delivered here in GitHub. See the README for troubleshooting and defect reporting instructions.](https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)
2
2
 
3
3
  # New Relic Ruby Agent
4
4
 
@@ -132,7 +132,7 @@ module NewRelic
132
132
  end
133
133
 
134
134
  def wants_stdout?
135
- ::NewRelic::Agent.config[:log_file_path].casecmp("STDOUT").zero?
135
+ ::NewRelic::Agent.config[:log_file_path].casecmp(NewRelic::STANDARD_OUT) == 0
136
136
  end
137
137
 
138
138
  def find_or_create_file_path(path_setting, root)
@@ -95,7 +95,7 @@ module NewRelic
95
95
  end
96
96
 
97
97
  def wants_stdout?
98
- ::NewRelic::Agent.config[:'audit_log.path'].casecmp("STDOUT").zero?
98
+ ::NewRelic::Agent.config[:'audit_log.path'].casecmp(NewRelic::STANDARD_OUT) == 0
99
99
  end
100
100
 
101
101
  def create_log_formatter