newrelic_rpm 8.12.0 → 8.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +14 -7
- data/CHANGELOG.md +42 -0
- data/README.md +2 -3
- data/lib/new_relic/agent/agent_logger.rb +1 -1
- data/lib/new_relic/agent/audit_logger.rb +1 -1
- data/lib/new_relic/agent/configuration/default_source.rb +1403 -1369
- data/lib/new_relic/agent/configuration/environment_source.rb +2 -2
- data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +1 -1
- data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +1 -1
- data/lib/new_relic/agent/instrumentation/active_merchant.rb +0 -2
- data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +0 -2
- data/lib/new_relic/agent/instrumentation/authlogic.rb +0 -2
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +0 -1
- data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +0 -2
- data/lib/new_relic/agent/instrumentation/excon.rb +17 -0
- data/lib/new_relic/agent/instrumentation/rack/chain.rb +10 -2
- data/lib/new_relic/agent/instrumentation/rack/prepend.rb +9 -2
- data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +0 -1
- data/lib/new_relic/agent/instrumentation/redis/chain.rb +18 -6
- data/lib/new_relic/agent/instrumentation/redis/constants.rb +17 -0
- data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +26 -18
- data/lib/new_relic/agent/instrumentation/redis/middleware.rb +16 -0
- data/lib/new_relic/agent/instrumentation/redis/prepend.rb +6 -0
- data/lib/new_relic/agent/instrumentation/redis.rb +6 -0
- data/lib/new_relic/agent/instrumentation/sidekiq/client.rb +20 -0
- data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +30 -0
- data/lib/new_relic/agent/instrumentation/sidekiq/server.rb +37 -0
- data/lib/new_relic/agent/instrumentation/sidekiq.rb +6 -70
- data/lib/new_relic/agent/instrumentation/sinatra.rb +0 -2
- data/lib/new_relic/agent/instrumentation/sunspot.rb +0 -2
- data/lib/new_relic/agent/method_tracer_helpers.rb +1 -1
- data/lib/new_relic/agent/parameter_filtering.rb +7 -1
- data/lib/new_relic/agent/tracer.rb +1 -1
- data/lib/new_relic/constants.rb +2 -0
- data/lib/new_relic/control/instrumentation.rb +4 -8
- data/lib/new_relic/local_environment.rb +1 -1
- data/lib/new_relic/rack/browser_monitoring.rb +1 -0
- data/lib/new_relic/version.rb +2 -2
- data/lib/tasks/helpers/prompt.rb +1 -1
- data/lib/tasks/instrumentation_generator/README.md +2 -2
- data/lib/tasks/instrumentation_generator/TODO.md +5 -5
- data/newrelic_rpm.gemspec +1 -1
- data/test/agent_helper.rb +18 -0
- metadata +9 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c5439c88f9169482c8899f11dc1f44062a80416ec8c8afa6e29fc426adf716e
|
4
|
+
data.tar.gz: 496c2021677de4853c07550f43d76fc78c73cd3dcae8b5e632f72e7f8e1db68f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdc8298c1fc3f96a1ed63a919ff5aed1bfbdf423a9e1f4b69afb21b9729000e53c4f28c59a776e854875160c4accc9b0b6eff5a019b435c6582eadeba688bb05
|
7
|
+
data.tar.gz: 9375a116af17397f6c05dc6d0a9d413ff147f097647340e1dd4f635f457398caf437034ad92a64ba10cbe4e7ee5db076cc9bdc447c32ecaf20f5ad6cf1f9948b
|
data/.rubocop.yml
CHANGED
@@ -1331,12 +1331,15 @@ Style/MethodCallWithArgsParentheses:
|
|
1331
1331
|
- add_development_dependency
|
1332
1332
|
- expect
|
1333
1333
|
- fail
|
1334
|
+
- gem
|
1334
1335
|
- include
|
1335
1336
|
- print
|
1336
1337
|
- puts
|
1338
|
+
- pp
|
1337
1339
|
- raise
|
1338
1340
|
- require
|
1339
1341
|
- skip
|
1342
|
+
- source
|
1340
1343
|
- stub
|
1341
1344
|
AllowedPatterns: [^assert, ^refute]
|
1342
1345
|
|
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:
|
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,47 @@
|
|
1
1
|
# New Relic Ruby Agent Release Notes #
|
2
2
|
|
3
|
+
## v8.13.1
|
4
|
+
|
5
|
+
Version 8.13.1 of the agent provides a bugfix for Redis v5.0 instrumentation.
|
6
|
+
|
7
|
+
* **Fix NoMethodError when using Sidekiq v7.0 with Redis Client v0.11**
|
8
|
+
|
9
|
+
In some cases, the `RedisClient` object cannot directly access methods like db, port, or path. These methods are always available on the `client.config` object. This raised a `NoMethodError` in environments that used Sidekiq v7.0 and [Redis Client](https://rubygems.org/gems/redis-client) v0.11. Thank you to [fcheung](https://github.com/fcheung) and [@stevenou](https://github.com/stevenou) for bringing this to our attention! [Issue#1639](https://github.com/newrelic/newrelic-ruby-agent/issues/1639)
|
10
|
+
|
11
|
+
|
12
|
+
## v8.13.0
|
13
|
+
|
14
|
+
Version 8.13.0 of the agent updates our Rack, Redis, and Sidekiq instrumentation. It also delivers some bugfixes.
|
15
|
+
|
16
|
+
* **Support for Redis v5.0**
|
17
|
+
|
18
|
+
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)
|
19
|
+
|
20
|
+
* **Support for Sidekiq v7.0**
|
21
|
+
|
22
|
+
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) **NOTE:** an issue was discovered with Sidekiq v7.0+ and addressed by Ruby agent v8.13.1. If you are using Sidekiq, please skip Ruby agent v8.13.0 and use v8.13.1 or above.
|
23
|
+
|
24
|
+
* **Support for Rack v3.0: Rack::Builder#new accepting a block**
|
25
|
+
|
26
|
+
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)
|
27
|
+
|
28
|
+
* **Bugfix: Correctly identify Unicorn, Rainbows and FastCGI with Rack v3.0**
|
29
|
+
|
30
|
+
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)
|
31
|
+
|
32
|
+
* **Bugfix: add_method_tracer fails to record code level metric attributes on private methods**
|
33
|
+
|
34
|
+
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.
|
35
|
+
```
|
36
|
+
WARN : Unable to determine source code info for 'Example', method 'private_method' - NameError: undefined method 'private_method' for class '#<Class:Example>'
|
37
|
+
```
|
38
|
+
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)
|
39
|
+
|
40
|
+
|
41
|
+
* **Bugfix: Category is a required keyword arg for NewRelic::Agent::Tracer.in_transaction**
|
42
|
+
|
43
|
+
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)
|
44
|
+
|
3
45
|
## v8.12.0
|
4
46
|
|
5
47
|
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/
|
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
|
|
@@ -76,12 +76,11 @@ For complete documentation on installing the New Relic Ruby agent, see the follo
|
|
76
76
|
|
77
77
|
### Recording Deploys
|
78
78
|
|
79
|
-
The Ruby agent supports
|
79
|
+
The Ruby agent supports recording deployments in New Relic via a command line
|
80
80
|
tool or Capistrano recipes. For more information on these features, see
|
81
81
|
[our deployment documentation](http://docs.newrelic.com/docs/ruby/recording-deployments-with-the-ruby-agent)
|
82
82
|
for more information.
|
83
83
|
|
84
|
-
*There is a [known issue](https://github.com/newrelic/newrelic-ruby-agent/issues/715) that prevents newly generated New Relic API keys from recording deploys.
|
85
84
|
|
86
85
|
## Support
|
87
86
|
|
@@ -132,7 +132,7 @@ module NewRelic
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def wants_stdout?
|
135
|
-
::NewRelic::Agent.config[:log_file_path].casecmp(
|
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)
|