중요
We recommend updating to the latest agent version as soon as it's available. If you can't upgrade to the latest version, update your agents to a version no more than 90 days old. Read more about keeping agents up to date.
See the New Relic Ruby agent EOL policy for information about agent releases and support dates.
v10.3.0
Feature: Add database query naming via SQL comments
Database queries can now be explicitly named using SQL comments. Queries can include
/* NewRelicQueryName: CustomName */comments to assign stable names for better tracking and identification. This is especially useful for tracking specific database queries during performance regressions or incidents. PR#3480Feature: Add Semantic Logger instrumentation
The agent now supports Semantic Logger log forwarding and decoration for the
semantic_loggergem versions 4.6.0+. If you were previously using Semantic Logger's built-in New Relic appender, it is recommended to choose one approach to avoid sending duplicate logs. New Relic's Semantic Logger instrumentation can be disabled by settinginstrumentation.semantic_loggertodisabled. PR#3467Thanks to @jdelStrother for providing valuable feedback that helped shape this instrumentation.
Feature: Add new 'ignored_middleware_classes' configuration
A new configuration option,
ignored_middleware_classes, allows users to exclude specific middlewares from instrumentation (ex. Rack::Cors). It defaults to an empty array. Issue#1814 PR#3481Feature: Add new
NewRelic::Agent.add_transaction_log_attributesAPIA new API,
NewRelic::Agent.add_transaction_log_attributes, allows users to add transaction-scoped custom attributes to log events for the current transaction. These attributes will only be applied to logs created within the scope of the current transaction. PR#3472Bugfix: Provide config option to reduce cardinality of ActionCable broadcast metrics
By default, the metrics for ActionCable broadcast method calls include the value of the broadcasting. This value can have very high cardinality. Now, the
:simplify_action_cable_broadcast_metricsconfiguration option allows users to remove the broadcasting value from the metric name. This creates a metric that looks like:Ruby/ActionCable/broadcast. When this configuration option is enabled, the broadcasting value will be added as a span attribute. PR#3463Bugfix: Remove dead 'digest/md5' require for FIPS/FedRAMP compliance
In version 7.1.0 of the agent, MD5 usage was replaced with SHA1 for FIPS compliance (PR). However, the old require for 'digest/md5' was not removed. We have removed the require to help our FIPS/FedRAMP users. Thank you to @ashleyboehs for bringing this to our attention! Issue#3469 PR#3470
Bugfix: Prevent agent from starting during
rails testto avoid shutdown delayPreviously, the agent would cause a ~3 second shutdown delay when running the
rails testcommand. TheRails::Command::TestCommandconstant has been added to the defaultautostart.denylisted_constantslist to prevent the agent from starting during Rails test runs. Thanks to @varyform for bringing this to our attention. PR#3478Bugfix: Fix "Unable to calculate elapsed transaction time" warnings when using Falcon web server
The agent now uses
Fiber.current.object_idinstead ofThread.current.object_idto track transaction state when running under Falcon, preventing collisions from concurrent requests sharing the same thread. Also fixes a "NameError: uninitialized constantAsync::HTTP::VERSION" when using Falcon. Thanks to @97jaz and @gsar for bringing this to our attention. PR#3483Bugfix: Fix typo in harvest.rb causing NoMethodError
A typo in
lib/new_relic/agent/agent_helpers/harvest.rbcaused aNoMethodError: undefined method 'agent' for NewRelic:Module. Thanks to @oakbow for reporting this issue. PR#3484Bugfix: Remove usage of deprecated ObjectSpace._id2ref
The agent now uses an alternative approach instead of the deprecated
ObjectSpace._id2refmethod, eliminating deprecation warnings when running on Ruby 4.0+. PR#3490Bugfix: Fix NoMethoError in Logging instrumentation
Previously, when the Logging gem instrumentation attempted to decorate local logs, it would raise a
NoMethodErrorif it encountered a non-string object. This is now fixed. PR#3501