• EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

Ruby agent release notesRSS

June 6
Ruby agent v9.10.2

重要

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.

v9.10.2

Version 9.10.2 fixes a bug related to the new DynamoDB instrumentation and removes Rails::Command::RakeCommand from the default list of denylisted constants.

  • Bugfix: DynamoDB instrumentation logging errors when trying to get account_id

    When trying to access data needed to add the account_id to the DynamoDB span, the agent encountered an error when certain credentials classes were used. This has been fixed. Thanks to @kichik for bringing this to our attention. PR#2864

  • Bugfix: Remove Rails::Command::RakeCommand from the default list of autostart.denylisted_constants

    The default value for the autostart.denylisted_constants configuration was changed in 9.10.0 to include Rails::Command::RunnerCommand and Rails::Command::RakeCommand. The inclusion of Rails::Command::RakeCommand prevented the agent from starting automatically when Solid Queue was started using bin/rails solid_queue:start. We recognize there are many commands nested within Rails::Command::RakeCommand and have decided to remove it from the default list. We encourage users who do not want the agent to run on Rails::Command::RakeCommand to add the constant to their configuration. This can be accomplished by adding the following to your newrelic.yml file:

    autostart.denylisted_constants: "Rails::Command::ConsoleCommand,Rails::Command::CredentialsCommand,Rails::Command::Db::System::ChangeCommand,Rails::Command::DbConsoleCommand,Rails::Command::DestroyCommand,Rails::Command::DevCommand,Rails::Command::EncryptedCommand,Rails::Command::GenerateCommand,Rails::Command::InitializersCommand,Rails::Command::NotesCommand,Rails::Command::RakeCommand,Rails::Command::RoutesCommand,Rails::Command::RunnerCommand,Rails::Command::SecretsCommand,Rails::Console,Rails::DBConsole"

    Thank you, @edariedl, for reporting this issue. Issue#2677 PR#2694

June 3
Ruby agent v9.10.1

重要

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.

v9.10.1

  • Bugfix: Incompatibility with Bootstrap

Version 9.10.1 fixes an incompatibility between the agent and the Bootstrap gem caused by agent v9.10.0's introduction of a lib/bootstrap.rb file. Thank you to @dorner for reporting the bug and identifying the 'bootstrap' name collision as the root cause. BUG#2675 PR#2676

May 29
Ruby agent v9.10.0

重要

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.

v9.10.0

Version 9.10.0 introduces instrumentation for DynamoDB, adds a new feature to automatically apply nonces from the Rails content security policy, fixes a bug that would cause an expected error to negatively impact a transaction's Apdex, and fixes the agent's autostart logic so that by default rails runner and rails db commands will not cause the agent to start.

  • Feature: Add instrumentation for DynamoDB

    The agent has added instrumentation for the aws-sdk-dynamodb gem. The agent will now record datastore spans for DynamoDB client calls made with the aws-sdk-dynamodb gem. PR#2642

  • Feature: Automatically apply nonces from the Rails content security policy

    To auto-inject browser monitoring with the New Relic Ruby agent, you either need to set your content security policy to 'unsafe-inline' or provide a nonce. Previously, the only way to provide a nonce was by using the NewRelic::Agent.browser_timing_header API. Now, when a Rails application uses the content security policy configuration to add a nonce, the nonce will be automatically applied to the browser agent. A new configuration option, browser_monitoring.content_security_policy_nonce, toggles this feature. It is on by default. Thank you @baldarn for submitting this feature! PR#2544

  • Bugfix: Expected errors related to HTTP status code, class, and message won't impact Apdex

    The agent is supposed to prevent observed application errors from negatively impacting Apdex if the errors are either ignored or expected. There are two ways for the agent to expect an error: via the notice_error API receiving an expected: true argument or via matches made against user-configured lists for expected HTTP status codes (:'error_collector.expected_status_codes'), expected error classes (:'error_collector.expected_classes'), or expected error messages (:'error_collector.expected_messages'). Previously, only errors expected via the notice_error API were correctly prevented from impacting Apdex. Expected errors set by configuration incorrectly impacted Apdex. This behavior has been fixed and now both types of expected errors will correctly not impact Apdex. Thanks very much to @florianpilz for bringing this issue to our attention. PR#2619

  • Bugfix: Do not start the agent automatically when rails runner or rails db commands are run

    PR#2239 taught the agent how to recognize bin/rails based contexts that it should not automatically start up in. But bin/rails runner and bin/rails db commands would still see the agent start automatically. Those 2 contexts will now no longer see the agent start automatically. Thank you to @jdelStrother for both bringing the bin/rails context to our attention and for letting us know about the bin/rails runner and bin/rails db outliers that still needed fixing. PR#2623

    Older agent versions that are still supported by New Relic can update to the new list of denylisted constants by having the following line added to the newrelic.yml configuration file:

    autostart.denylisted_constants: "Rails::Command::ConsoleCommand,Rails::Command::CredentialsCommand,Rails::Command::Db::System::ChangeCommand,Rails::Command::DbConsoleCommand,Rails::Command::DestroyCommand,Rails::Command::DevCommand,Rails::Command::EncryptedCommand,Rails::Command::GenerateCommand,Rails::Command::InitializersCommand,Rails::Command::NotesCommand,Rails::Command::RakeCommand,Rails::Command::RoutesCommand,Rails::Command::RunnerCommand,Rails::Command::SecretsCommand,Rails::Console,Rails::DBConsole"

April 17
Ruby agent v9.9.0

重要

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.

v9.9.0

Version 9.9.0 introduces support for AWS Lambda serverless function observability, adds support for Elasticsearch 8.13.0, and adds the 'request.temperature' attribute to chat completion summaries in ruby-openai instrumentation.

  • Feature: Serverless Mode for AWS Lambda

    The Ruby agent is now capable of operating in a quick and light serverless mode suitable for observing AWS Lambda function invocations. For serverless use, the agent is delivered by a New Relic Lambda layer that can be associated with a Lambda function. All reported data will appear in New Relic's dedicated serverless UI views. Only AWS based Lambda functions are supported for now, though support for other cloud hosted serverless offerings may be added in future depending on Ruby customer demand. The serverless functionality is only intended for use with the official New Relic Ruby layers for Lambda. Any existing workflows that involve the manual use of the Ruby agent in an AWS Lambda context without a New Relic layer should not be impacted.

  • Feature: Add support for Elasticsearch 8.13.0

    Elasticsearch 8.13.0 increased the number of arguments used in the method the agent instruments, Elastic::Transport::Client#perform_request. Now, the agent supports a variable number of arguments for the instrumented method to prevent future ArgumentErrors.

  • Bugfix: Add 'request.temperature' to ruby-openai chat completion summaries

    Previously, the agent was not reporting the request.temperature attribute on LlmChatCompletionSummary events through ruby-openai instrumentation. We are now reporting this attribute.

March 26
Ruby agent v9.8.0

重要

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.

v9.8.0

Version 9.8.0 introduces instrumentation for ruby-openai, adds the option to store tracer state on the thread-level, hardens the browser agent insertion logic to better proactively anticipate errors, and prevents excpetions from being raised in the Active Support Broadcast logger instrumentation.

  • Feature: Add instrumentation for ruby-openai

    Instrumentation has been added for the ruby-openai gem, supporting versions 3.4.0 and higher (PR#2442). While ruby-openai instrumentation is enabled by default, the configuration option ai_monitoring.enabled is disabled by default and controls all AI monitoring. ai_monitoring.enabled must be set to true in order to receive ruby-openai instrumentation. High-Security Mode must be disabled in order to receive AI monitoring.

    Calls to embedding and chat completion endpoints are automatically traced. These events can be enhanced with the introduction of two new APIs. Custom attributes can also be added to LLM events using the API NewRelic::Agent.add_custom_attributes, but they must be prefixed with llm.. For example, NewRelic::Agent.add_custom_attributes({'llm.user_id': user_id}).

  • Feature: Add AI monitoring APIs

    This version introduces two new APIs that allow users to record additional information on LLM events:

    • NewRelic::Agent.record_llm_feedback_event - Records user feedback events.
    • NewRelic::Agent.set_llm_token_count_callback - Sets a callback proc for calculating token_count attributes for embedding and chat completion message events.

    Visit RubyDoc for more information on each of these APIs.

  • Feature: Store tracer state on thread-level

    A new configuration option, thread_local_tracer_state, stores New Relic's tracer state on the thread-level, as opposed to the default fiber-level storage. This configuration is turned off by default. Our thanks go to community member @markiz who contributed the idea, code, configuration option, and tests for this new feature! PR#2475.

  • Bugfix: Harden the browser agent insertion logic

    With Issue#2462, community member @miry explained that it was possible for an HTTP response headers hash to have symbols for values. Not only would these symbols prevent the inclusion of the New Relic browser agent tag in the response body, but more importantly they would cause an exception that would bubble up to the monitored web application itself. With PR#2465 symbol based values are now supported and all other potential future exceptions are now handled. Additionally, the refactor to support symbols has been shown through benchmarking to give the processing of string and mixed type hashes a slight speed boost too.

  • Bugfix: Prevent Exception in Active Support Broadcast logger instrumentation

    Previously, in certain situations the agent could cause an exception to be raised when attempting to interact with a broadcast log event. This has been fixed. Thanks to @nathan-appere for reporting this issue and providing a fix! PR#2510

January 25
Ruby agent v9.7.1

重要

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.

v9.7.1

Version 9.7.1 fixes a ViewComponent instrumentation bug and enforces maximum size limits for custom event attributes.

  • Bugfix: Stop suppressing ViewComponent errors

    Previously, the agent suppressed ViewComponent render errors. The agent now reports these errors and allows them to raise. Thank you @mjacobus for reporting this bug and providing a fix! PR#2410

  • Bugfix: Enforce maximum size limits for custom event attributes

    Previously, the agent would allow custom event attributes to be any size. This would lead to the New Relic backend dropping attributes larger than the maximum size. Now, the agent will truncate custom event attribute values to 4095 characters, attribute names to 255 characters, and the total count of attributes to 64. PR#2401

January 10
Ruby agent v9.7.0

重要

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.

v9.7.0

Version 9.7.0 introduces ViewComponent instrumentation, changes the endpoint used to access the cluster name for Elasticsearch instrumentation, removes the creation of the Ruby/Thread and Ruby/Fiber spans, and adds support for Falcon.

  • Feature: ViewComponent instrumentation

    ViewComponent is a now an instrumented library. PR#2367

  • Feature: Use root path to access Elasticsearch cluster name

    Previously, the agent used the cluster health endpoint (/_cluster/health) to access the cluster name. However, this has been found to make startup unstable for large clusters. Now, the agent uses the more performant root endpoint (/).

    Our thanks go to @erikkessler1, @gremerritt, and @joshbranham for reporting the issue, suggesting solutions, and testing them. Issue#2360 PR#2377

  • Feature: Remove base64 dependency, use direct calls to String methods

    In version 9.6.0, the agent required the Ruby base64 gem as a depdendency to prepare for deprecation warnings in Ruby 3.3 and the gem's removal from the Ruby standard libraries in 3.4. Including base64 as a dependency has caused problems with version resolution in some environments.

    To resolve this, the agent now directly calls the String methods used in the base64 library in the new NewRelic::Base64 module.

    Thank you, @Earlopain, for submitting this change. PR#2378

  • Feature: Add Falcon support

    The agent now supports the web server Falcon. PR#2383

  • Feature: Remove spans with name Ruby/Thread and Ruby/Fiber

    Due to the lack of helpful information and the confusion commonly caused by the spans named Ruby/Thread and Ruby/Fiber, these spans have been removed. However, the agents ability to monitor instrumented code running in a thread or fiber will remain unchanged. PR#2389

October 30, 2023
Ruby agent v9.6.0

重要

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.

v9.6.0

Version 9.6.0 adds instrumentation for Async::HTTP, Ethon, and HTTPX, adds the ability to ignore specific routes with Roda, gleans Docker container IDs from cgroups v2-based containers, records additional synthetics attributes, fixes an issue with Rails 7.1 that could cause duplicate log records to be sent to New Relic, fixes a deprecation warning for the Sidekiq error handler, adds additional attributes for OpenTelemetry compatibility, and resolves some technical debt, thanks to the community.

  • Feature: Add instrumentation for Async::HTTP

    The agent will now record spans for Async::HTTP requests. Versions 0.59.0 and above of the async-http gem are supported. PR#2272

  • Feature: Add instrumentation for Ethon

    Instrumentation has been added for the Ethon HTTP client gem. Versions 0.12.0 and above are supported. The agent will now record external request segments for invocations of Ethon::Easy#perform and Ethon::Multi#perform. NOTE: The Typhoeus gem is maintained by the same team that maintains Ethon and depends on Ethon for its functionality. To prevent duplicate reporting for each HTTP request, the Ethon instrumentation will be disabled when Typhoeus is detected. PR#2260

  • Feature: Add instrumentation for HTTPX

    The agent now offers instrumentation for the HTTP client HTTPX, provided the gem is at version 1.0.0 or above. PR#2278

  • Feature: Prevent the agent from starting in "rails" commands in Rails 7

    Previously, the agent ignored many Rails commands by default, such as rails routes, using Rake-specific logic. This was accomplished by setting these commands as default values for the config option autostart.denylisted_rake_tasks. However, Rails 7 no longer uses Rake for these commands, causing the agent to start running and attempting to record data when running these commands. The commands have now been added to the default value for the config option autostart.denylisted_constants, which will allow the agent to recognize these commands correctly in Rails 7 and prevent the agent from starting during ignored tasks. Note that the agent will continue to start-up when the rails server and rails runner commands are invoked. PR#2239

  • Feature: Glean Docker container ID for cgroups v2-based containers

    Previously, the agent was only capable of determining a host Docker container's ID if the container was based on cgroups v1. Now, containers based on cgroups v2 will also have their container IDs reported to New Relic. PR#2229.

  • Feature: Update events with additional synthetics attributes when available

    The agent will now record additional synthetics attributes on synthetics events if these attributes are available. PR#2203

  • Feature: Declare a gem dependency on the Ruby Base 64 gem 'base64'

    For compatibility with Ruby 3.4 and to silence compatibility warnings present in Ruby 3.3, declare a dependency on the base64 gem. The New Relic Ruby agent uses the native Ruby base64 gem for Base 64 encoding/decoding. The agent is joined by Ruby on Rails (rails/rails@3e52adf) and others in making this change in preparation for Ruby 3.3/3.4. PR#2238

  • Feature: Add Roda support for the newrelic_ignore* family of methods

    The agent can now selectively disable instrumentation for particular requests within Roda applications. Supported methods include:

    • newrelic_ignore: ignore a given route.
    • newrelic_ignore_apdex: exclude a given route from consideration in overall Apdex calculations.
    • newrelic_ignore_enduser: prevent automatic injection of the page load timing JavaScript when a route is rendered.

    For more information, see Roda Instrumentation. PR#2267

  • Feature: Add additional span attributes for OpenTelemetry compatibility

    For improved compatibility with OpenTelemetry's semantic conventions, the agent's datastore (for databases) and external request (for HTTP clients) segments have been updated with additional attributes.

    Datastore segments now offer 3 additional attributes:

    • db.system: The database system. For Ruby we use the database adapter name here.
    • server.address: The database host.
    • server.port: The database port.

    External request segments now offer 3 additional attributes:

    • http.request.method: The HTTP method (ex: 'GET')
    • server.address: The target host.
    • server.port: The target port.

    For maximum backwards compatibility, no existing attributes have been renamed or removed. PR#2283

  • Bugfix: Stop sending duplicate log events for Rails 7.1 users

    Rails 7.1 introduced the public API ActiveSupport::BroadcastLogger. This logger replaces a private API, ActiveSupport::Logger.broadcast. In Rails versions below 7.1, the agent uses the broadcast method to stop duplicate logs from being recoded by broadcasted loggers. Now, we've updated the code to provide a similar duplication fix for the ActiveSupport::BroadcastLogger class. PR#2252

  • Bugfix: Resolve Sidekiq 8.0 error handler deprecation warning

    Sidekiq 8.0 will require procs passed to the error handler to include three arguments: error, context, and config. Users running sidekiq/main would receive a deprecation warning with this change any time an error was raised within a job. Thank you, @fukayatsu for your proactive fix! PR#2261

  • Community: Resolve technical debt

    We also received some great contributions from community members to resolve some outstanding technical debt issues. Thank you for your contributions!

September 12, 2023
Ruby agent v9.5.0

重要

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.

v9.5.0

Version 9.5.0 introduces Stripe instrumentation, allows the agent to record additional response information on a transaction when middleware instrumentation is disabled, introduces new :'sidekiq.args.include' and :'sidekiq.args.exclude: configuration options to permit capturing only certain Sidekiq job arguments, updates Elasticsearch datastore instance metrics, and fixes a bug in NewRelic::Rack::AgentHooks.needed?.

  • Feature: Add Stripe instrumentation

    Stripe calls are now automatically instrumented. Additionally, new :'stripe.user_data.include' and :'stripe.user_data.exclude' configuration options permit capturing custom user_data key-value pairs that can be stored in Stripe events. No user_data key-value pairs are captured by default. The agent currently supports Stripe versions 5.38.0+. PR#2180

  • Feature: Report transaction HTTP status codes when middleware instrumentation is disabled

    Previously, when disable_middleware_instrumentation was set to true, the agent would not record the value of the response code or content type on the transaction. This was due to the possibility that a middleware could alter the response, which would not be captured by the agent when the middleware instrumentation was disabled. However, based on customer feedback, the agent will now report the HTTP status code and content type on a transaction when middleware instrumentation is disabled. PR#2175

  • Feature: Permit capturing only certain Sidekiq job arguments

    New :'sidekiq.args.include' and :'sidekiq.args.exclude' configuration options have been introduced to permit fine grained control over which Sidekiq job arguments (args) are reported to New Relic. By default, no Sidekiq args are reported. To report any Sidekiq options, the :'attributes.include' array must include the string 'jobs.sidekiq.args.*'. With that string in place, all arguments will be reported unless one or more of the new include/exclude options are used. The :'sidekiq.args.include' option can be set to an array of strings. Each of those strings will be passed to Regexp.new and collectively serve as an allowlist for desired args. For job arguments that are hashes, if a hash's key matches one of the include patterns, then both the key and its corresponding value will be included. For scalar arguments, the string representation of the scalar will need to match one of the include patterns to be captured. The :'sidekiq.args.exclude' option works similarly. It can be set to an array of strings that will each be passed to Regexp.new to create patterns. These patterns will collectively serve as a denylist for unwanted job args. Any hash key, hash value, or scalar that matches an exclude pattern will be excluded (not sent to New Relic). PR#2177

    newrelic.yml examples:

    Any string in the :'sidekiq.args.include' or :'sidekiq.args.exclude' arrays will be turned into a regular expression. Knowledge of Ruby regular expression support can be leveraged but is not required. If regular expression syntax is not used, inexact matches will be performed and the string "Fortune" will match both "Fortune 500" and "Fortune and Glory". For exact matches, use regular expression anchors.

    # Include any argument whose string representation matches either "apple" or "banana"
    # The "apple" pattern will match both "green apple" and "red apple"
    sidekiq.args.include:
    - apple
    - banana
    # Exclude any arguments that match either "grape", "orange", or "pear"
    sidekiq.args.exclude:
    - grape
    - orange
    - pear
    # Exclude any argument that is a 9 digit number
    sidekiq.args.exclude:
    - '\d{9}'
    # Include anything that starts with "blue" but exclude anything that ends in "green"
    sidekiq.args.include
    - '^blue'
    sidekiq.args.exclude
    - 'green$'
  • Bugfix: Update Elasticsearch datastore instance metric to use port instead of path

    Previously, the Elasticsearch datastore instance metric (Datastore/instance/Elasticsearch/<host>/*) used the path as the final value. This caused a metrics grouping issue for some users, as every document ID created a unique metric. Now, the datastore instance metric has been updated to use the port as the final value. This also has the benefit of being more accurate for datastore instance metrics, as this port is directly associated with the already listed host.

  • Bugfix: Resolve inverted logic of NewRelic::Rack::AgentHooks.needed?

    Previously, NewRelic::Rack::AgentHooks.needed? incorrectly used inverted logic. This has now been resolved, allowing AgentHooks to be installed when disable_middleware_instrumentation is set to true. PR#2175

August 18, 2023
Ruby agent v9.4.2

重要

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.

v9.4.2

Version 9.4.2 of the agent re-addresses the 9.4.0 issue of NoMethodError seen when using the uppy-s3_multipart gem.

  • Bugfix: Resolve NoMethodError

    Ruby agent 9.4.1 attempted to fix a NoMethodError introduced in 9.4.0. A missing require prevented a method from scoping appropriately and has now been added. Thanks to @spickermann and @ColinOrr for working with us to get this resolved. PR#2167

Copyright © 2024 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.