Version 8.14.0 of the agent restores desired Capistrano-based changelog lookup functionality when a deployment is performed, speeds up GUID generation, delivers support for instrumenting Rails custom event notifications, fixes potential compatibility issues with the RedisClient gem, and fixes bugs related to initialization in Rails.
The New Relic Ruby agent offers a Capistrano recipe for recording app deployments. The recipe code was significantly cleaned up with PR#1498 which inadvertently changed the way the recipe handles the changelog for a deployment. Community member @arthurwozniak spotted and corrected this change in order to restore the desired changelog lookup functionality while retaining all of the previous cleanup. Thank you very much for your contribution, @arthurwozniak! PR#1653
Speed up GUID generation
The agent leverages random numbers in its GUID (globally unique identifier) generation and would previously always freshly calculate the result of 16^16 or 32^32 before generating a random number. Given that those 16^16 and 32^32 operations are expected, it makes sense to calculate their results up front and store them in constants to be referred to later. Doing so has resulted in a performance gain for the generation of GUIDs. Many thanks to @tungmq for contributing this optimisation and the benchmarks to support it! PR#1693
Support for Rails ActiveSupport::Notifications for custom events
When the new active_support_custom_events_names configuration parameter is set equal to an array of custom event names to subscribe to, the agent will now subscribe to each of the names specified and report instrumentation for the events when they take place. Creating custom events is simple and now reporting instrumentation for them to New Relic is simple as well. PR#1659
Bugfix: Support older versions of the RedisClient gem, handle unknown Redis database index
With version 8.13.0 of the agent, support was added for the redis-rb gem v5+ and the new RedisClient gem. With versions of RedisClient older than v0.11, the agent could cause the monitored application to crash when attempting to determine the Redis database index. Version 8.14.0 adds two related improvements. Firstly, support for RedisClient versions older than v0.11 has been added to get at the database index value. Secondly, the agent will no longer crash or impact the monitored application in the event that the database index cannot be obtained. Thank you very much to our community members @mbsmartee and @patatepartie for bringing this issue to our attention, for helping us determine how to best reproduce it, and for testing out the update. We appreciate your help! Issue#1650PR#1673
Bugfix: Defer agent startup in Rails until after application-defined initializers have run
In Rails, the agent previously loaded before any application-defined initializers. This allowed initializers to reference the add_method_tracer API. However, this had the side-effect of forcing some framework libraries to load before initializers ran, preventing any configuration values related to these libraries from being applied. This fix provides an option to split initialization into two parts: load add_method_tracer before application-defined initializers and start the agent after application-defined initializers. This may cause other initializers to behave differently.
If you'd like to use this feature, set defer_rails_initialization to true. It is false by default, but may become true by default in a future release.
Furthermore, our Action View instrumentation was missing an ActiveSupport.on_load block around the code that loads our instrumentation.
Thank you @jdelStrother for bringing this to our attention and collaborating with us on a fix. PR#1658
v8.13.1
Version 8.13.1 of the agent provides a bugfix for Redis v5.0 instrumentation.
Fix NoMethodError when using Sidekiq v7.0 with RedisClient v0.11
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 RedisClient v0.11. Thank you to @fcheung and @stevenou for bringing this to our attention! Issue#1639
v8.13.0
Version 8.13.0 of the agent updates our Rack, Redis, and Sidekiq instrumentation. It also delivers some bugfixes.
Support for Redis v5.0
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. 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
Support for Sidekiq v7.0
Sidekiq v7.0 removed Delayed Extensions and began offering client and server middleware 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#1615NOTE: 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.
... (truncated)
Commits
74737a4 Merge pull request #1695 from newrelic/eight_fourteen_and_no_100
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps newrelic_rpm from 3.8.1.221 to 8.14.0.
Release notes
Sourced from newrelic_rpm's releases.
... (truncated)
Changelog
Sourced from newrelic_rpm's changelog.
... (truncated)
Commits
74737a4
Merge pull request #1695 from newrelic/eight_fourteen_and_no_10000f5ae0
8.14.066ceae1
Merge pull request #1694 from newrelic/100_acre_wood0d6d8a2
Merge pull request #1692 from newrelic/NR1434_resolve_cross_agent_test_todo7f35c7b
tests and CHANGELOG entry for 16930b89d57
Merge pull request #1693 from tungmq/deve0774d8
Align case / end for style5c091a8
Add default MAX_RAND value for length 16 & 32df4bace
appease rubocop4cd575b
Update test and test case 'vendors' keyDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)