Important
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.6.0
Feature: SpanLink events are now supported for the Hybrid agent
Spans created by an OpenTelemetry API can now have Span Links associated with them. Links can be added on a span's start, by passing them to the
linksargument, or by calling theOpenTelemetry::Trace::Span#add_linkAPI. PR#3586Feature: SpanEvent events are now supported for the Hybrid agent
Spans created by an OpenTelemetry API can now have SpanEvent events associated with them via the
OpenTelemetry::Trace::Span#add_eventAPI. SpanEvent events capture timestamped annotations on a span and are sent to New Relic alongside the parent span. PR#3587Feature: Set span kind on all Hybrid agent spans
Previously, only OpenTelemetry spans translated into external request segments or datastore segments added span kind as an attribute. Now, the agent adds span kind to all OpenTelemetry spans where the value is available. PR#3589
Feature: Add support for OpenTelemetry::Tracer#start_root_span
The
OpenTelemetry::Tracer#start_root_spanAPI can now be used to force a transaction to start for a given span, provided it has a:serveror:consumerspan kind. For any other span kinds, it will no-op. This method is most commonly used in background job instrumentation. PR#3588Bugfix: Fix
instrumentation.rails_event_logger: falsenot disabling the instrumentationPreviously, setting
instrumentation.rails_event_loggertofalsedidn't disable theRails.eventinstrumentation as expected; it would still be installed during Rails boot. This is now fixed. PR#3564Bugfix: Normalize boolean-like values to
disabledfor instrumentation config keysPreviously, only
disabledwould turn off aninstrumentation.*config key. Now, boolean-like values such asfalse,no, oroffalso resolve todisabledand prevent the instrumentation from being installed. PR#3579Bugfix: Per-library logging supportability metrics now reflect each library's instrumentation state
Previously, the
Supportability/Logging/Ruby/{library}/{enabled|disabled}metrics reported the value of the globalapplication_logging.enabledsetting for every library, rather than each library's actual state. As a result, the metric reportedenabledeven when you had disabled logging instrumentation for a specific library or weren't using that library's gem at all. Now, each library's metric reflects whether its own logging instrumentation is enabled. PR#3571
Important
最新のエージェント バージョンが利用可能になったらすぐに更新することをお勧めします。最新バージョンにアップグレードできない場合は、エージェントを 90 日以内のバージョンに更新してください。エージェントを最新の状態に保つ方法の詳細については、こちらをご覧ください。
エージェントのリリースとサポート日については、New Relic Ruby エージェントのEOL ポリシーを参照してください。
v10.5.0
機能:Dalli 5.0のサポートを追加し、メタプロトコルの計装を修正
エージェントは、メタプロトコルのみを使用するために
Dalli::Protocol::Binaryを削除したDalli 5.0+をサポートするようになりました。Dalli 3.2.0以降の場合、pipelined_getの計装は、Dalli::Protocol::BinaryではなくDalli::Protocol::Base(メソッドが定義されている場所)を正しくターゲットにするようになり、メタプロトコルを使用する際にget_multiの呼び出しが計装されないというギャップが修正されました。Dalli 5.0+では、エージェントは、Dalliの単一サーバーのget_multi最適化によって呼び出されるDalli::Protocol::Meta#read_multi_reqを追加でインストゥルメントします。PR#3541機能:active_record_use_table_name設定オプションを追加
新しい設定オプション
active_record_use_table_nameは、メトリクス、スパン、およびトランザクショントレースセグメントの名前を付ける際に、Active Recordモデルのクラス名ではなくテーブル名を使用します。これは、単一テーブル継承を使用するアプリケーションでカーディナリティを削減するのに特に役立ちます。既存の動作を維持するため、このオプションはデフォルトでfalseになります。PR#3540機能:エージェントログ内のライセンスキーを部分的に秘匿化
以前は、エージェントはエージェントログ内のNew Relicライセンスキーを完全に秘匿化していました。これで、最初の10文字が表示され、残りは
*に置き換えられます。これにより、キーのシークレット部分を公開することなく、リージョン関連の問題をトラブルシューティングするのに十分な情報が保持されます。PR#3547バグ修正:Semantic ロガー計装の非互換性を修正
rails_semantic_logger以前は、
rails_semantic_loggerの使用中に例外がActionDispatch::DebugExceptionsに到達すると、ArgumentErrorが発生していました。これは修正されました。ご報告いただいた @jdelStrother に感謝します! PR#3548
Important
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.4.0
Feature: Add Rails.event instrumentation for structured logging
The agent now supports Rails.event as structured log events. When enabled, events published via
Rails.event.notifyare captured and forwarded to New Relic as log events. Event payloads, tags, context, timestamps, and source locations are automatically captured as log attributes.This instrumentation can be configured with the following options:
instrumentation.rails_event_logger- Controls whether Rails.event instrumentation is enabled. Defaults to use the value ofapplication_logging.enabled.instrumentation.rails_event_logger.event_names- An array of specific event names to capture. When empty (default), all Rails.event notifications are captured. Use this to filter events by name, for example:['user.signup', 'payment.processed'].
Feature: Add instrumentation for Rails Active Job Continuations
The agent now instruments Rails Active Job Continuations, providing visibility into individual step execution within long-running jobs. Step names are included in segment metrics (e.g.,
Ruby/ActiveJob/default/MyJob/step/process_records) and step-specific attributes like cursor position, resumed status, and interrupted status are captured. A new configuration option,disable_active_job_step_names, allows users to exclude step names from metric names to reduce metric cardinality if needed (defaults tofalse). PR#3493Feature: Add sidekiq.separate_transactions configuration option
A new configuration option,
sidekiq.separate_transactions, allows Sidekiq jobs executed during a web transaction to run in their own separate transaction. When enabled, this prevents Sidekiq job execution time from being included in web transaction metrics, providing more accurate performance data. The feature is opt-in (default: false) to maintain backward compatibility. This only affects jobs executed during active web transactions; jobs starting independently or nested within other background jobs are unaffected. Issue#3364 PR#3514Bugfix: Update regexes that may have been vulnerable to ReDOS attacks
Previously, the agent had a few regexes identified as possible targets for polynomial time complexity (ReDOS) attacks. Those regexes are now updated to address the concerns. PR#3520
Bugfix: Prevent crashes during HTTPX segment creation
Previously, if
start_external_request_segmentencountered an error and returnednil, the agent would trigger aNoMethodErrorwhen attempting to add headers to the missing segment. We've added a guard check to ensure the instrumentation handles these cases gracefully.Bravo to @thebravoman for the report! Issue#3509 PR#3510
Bugfix: Make Transaction#finish idempotent
Previously, if the Transaction#finish method was called multiple times, more than one transaction could be created for the same operation. Now, a mutex protects calls to Transaction#finish to make sure finish operations only run once. PR#3513
Bugfix: Log deprecation warning for Datastores.wrap API once
Previously, this warning was being logged on every call to Datastores.wrap. Now, it will be logged only on the first call. In addition, the documentation has been updated to note the deprecated status of the second and third callback arguments. Issue#3516 PR#3519
Important
最新のエージェント バージョンが利用可能になったらすぐに更新することをお勧めします。最新バージョンにアップグレードできない場合は、エージェントを 90 日以内のバージョンに更新してください。エージェントを最新の状態に保つ方法の詳細については、こちらをご覧ください。
エージェントのリリースとサポート日については、New Relic Ruby エージェントのEOL ポリシーを参照してください。
v10.3.0
機能:SQLコメントによるデータベースクエリ命名機能を追加
データベースクエリにSQLコメントを使用して明示的に名前を付けることができるようになりました。クエリには、追跡と識別を容易にするために安定した名前を割り当てるための
/* NewRelicQueryName: CustomName */コメントを含めることができます。これは、パフォーマンス低下やインシデント発生時に特定のデータベースクエリを追跡する際に特に役立ちます。PR#3480機能: セマンティックロガー計装を追加
エージェントは、
semantic_loggergem バージョン 4.6.0 以降のセマンティック ロガーログ転送と装飾をサポートするようになりました。 以前 Semantic ロガーの組み込みNew Relicアペンダーを使用していた場合は、重複ログの送信を避けるために、いずれかの方法を選択することをお勧めします。 New Relicのセマンティック ロガー計装は、instrumentation.semantic_loggerをdisabledに設定することで無効にできます。 PR#3467この計装を形作る上で貴重なフィードバックを提供してくれた@jdelStrotherに感謝します。
機能: 新しい「ignored_middleware_classes」設定を追加
新しい設定オプション
ignored_middleware_classes使用すると、ユーザーは特定のミドルウェアを計装から除外できます。 ラック::Cors)。デフォルトでは空の配列になります。問題番号1814 PR番号3481機能: 新しい
NewRelic::Agent.add_transaction_log_attributesAPI を追加新しいAPI
NewRelic::Agent.add_transaction_log_attributes使用すると、ユーザーは、現在の場所のログイベントに、瞬間スコープのカスタムアトリビュートを追加できます。 これらの属性は、現在のトランザクションの範囲内で作成されたログにのみ適用されます。PR#3472バグ修正:ActionCableブロードキャストメトリクスのカーディナリティを削減するための設定オプションを提供
デフォルトでは、Metrix for ActionCable ブロードキャスト メソッド呼び出しにはブロードキャストの値が含まれます。 この値は非常に高いカーディナリティを持つ可能性があります。 現在、
:simplify_action_cable_broadcast_metrics設定オプションにより、ユーザーはメトリクス名からブロードキャスト値を削除できるようになりました。 これにより、Ruby/ActionCable/broadcastのようなメトリクスが作成されます。 この設定オプションを有効にすると、ブロードキャスト値がスパン属性として追加されます。PR#3463バグ修正: FIPS/FedRAMP準拠のための不要な「digest/md5」要件を削除
エージェントのバージョン7.1.0では、FIPS準拠のためMD5の使用がSHA1に置き換えられました(PR) 。しかし、以前の「digest/md5」の要件は削除されませんでした。FIPS/FedRAMP の支援に関する要件を削除しました。 この件を指摘してくださった@ashleyboehsさんに感謝いたします!Issue#3469 PR#3470
バグ修正: シャットダウン遅延を回避するため、
rails testの間にエージェントが起動しないようにする以前は、エージェントが
rails testコマンドを実行すると、約3秒のシャットダウン遅延が発生していました。Railsのテスト実行中にエージェントが起動しないようにするため、定数Rails::Command::TestCommandがデフォルトのautostart.denylisted_constantsリストに追加されました。この件を指摘してくださった@varyformさんに感謝します。PR#3478バグ修正: Falcon Web サーバーを使用する場合の「経過時間を計算できません」という警告を修正
エージェントは、 Falconで実行するときに
Thread.current.object_idの代わりにFiber.current.object_id使用して状態を追跡するようになり、同じスレッドを共有する同時requestsによる衝突を防ぎます。 また、Falcon使用時に発生する「NameError: uninitilized constantAsync::HTTP::VERSION」というエラーも修正します。この件を指摘してくださった@97jazさんと@gsarさんに感謝します。PR#3483バグ修正: harvest.rb のタイプミスにより NoMethodError が発生する問題を修正しました。
lib/new_relic/agent/agent_helpers/harvest.rbタイプミスによりNoMethodError: undefined method 'agent' for NewRelic:Moduleが発生しました。この問題を報告してくれた@oakbowに感謝します。PR#3484バグ修正: 非推奨の ObjectSpace._id2ref の使用を削除
エージェントは、非推奨の
ObjectSpace._id2refメソッドの代わりに別の方法を使用するようになり、Ruby 4.0 以降で実行する場合の非推奨警告が解消されます。PR#3490バグ修正: ロギング計装の NoMethoError を修正
以前は、Logging gem 計装がローカル ログを装飾しようとしたときに、文字列以外のオブジェクトに遭遇すると
NoMethodErrorが発生していました。 この問題は修正されました。PR#3501
Important
最新のエージェント バージョンが利用可能になったらすぐに更新することをお勧めします。最新バージョンにアップグレードできない場合は、エージェントを 90 日以内のバージョンに更新してください。エージェントを最新の状態に保つ方法の詳細については、こちらをご覧ください。
エージェントのリリースとサポート日については、New Relic Ruby エージェントのEOL ポリシーを参照してください。
v10.2.0
機能: OpenTelemetry トレースのサポートのためのハイブリッド エージェントの導入
New Relic Rubyエージェントの新しいハイブリッドエージェント機能を使用して、 OpenTelemetry Tracing APIをNew Relicテレメトリーに変換できるようになりました。 これにより、
newrelic_rpmgem はOpenTelemetry SDK と同様に動作し、 OpenTelemetry APIコールを受け入れて、使い慣れた属性と名前を持つNew Relicトランザクションとセグメントに変換できるようになります。次の設定オプションは、ハイブリッド エージェント機能に関連しています。
設定名 デフォルト 行動 OpenTelemetryが有効 falseNew Relicを介して送信されるすべてのOpenTelemetry信号を無効にするグローバル設定オプション。 OpenTelemetry.Trace.enabled trueOpenTelemetryスパンからの瞬間トレース セグメントとタイムスライス メトリクスの作成を有効にします OpenTelemetry.トレース.include ''OpenTelemetryのカンマ区切りのリスト。文字列として表されます(例: 「AppTracer1, OpenTelemetry ::計装::Bunny::計装」)、トレース信号がNew Relicに送信されます。 OpenTelemetry.トレース.exclude ''OpenTelemetryのカンマ区切りのリスト。文字列として表されます(例: "AppTracer1, OpenTelemetry ::計装::Bunny::計装")、トレース信号はNew Relicに送信されません。 New Relic計装と競合する計装用の既知のトレーサーはすべてデフォルトで除外されます。 機能: 設定オプション error_collector.backtrace_truncate_location を追加
新しい設定オプション
error_collector.backtrace_truncate_locationが追加されました。これにより、フレーム数がerror_collector.max_backtrace_framesを超えた場合にバックトレース内のどこで切り捨てるかをユーザーが指定できるようになりました。 オプションは、'top'(先頭からフレームを削除)、'middle'(先頭と末尾を保持したまま中間からフレームを削除)、または'end'(末尾からフレームを削除) です。デフォルトは'middle'です。PR#3424機能: Logging gem 計装を追加
エージェントは、 Logging gemによって生成されたログを記録するようになりました。PR#3420
機能: 設定オプション utilization.detect_in_parallel を追加
新しい設定オプション
utilization.detect_in_parallelが追加されました。これは、エージェントの起動を高速化するためにcloudベンダー情報を検出するときにエージェントがスレッドを使用するかどうかを制御します。falseに設定すると、ベンダー検出はスレッドを作成せずに順番に実行されます。デフォルトはtrueです。PR#3439
Important
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.1.0
Feature: Add support for forking processes in Parallel gem instrumentation
Parallel gem instrumentation has been added to allow more consistent monitoring in processes forked using the Parallel gem. PR#3405
Feature: Add support for Grape v3.1.0
Grape's release of v3.1.0 introduced changes that were incompatible with the agent's instrumentation, causing issues when collecting transaction names. The agent has been updated to properly extract class names for transaction naming in the updated Grape API structure. PR#3413
Bugfix: Create health check files in forked processes
The agent now properly initializes health check loops after forking, ensuring each process generates its own health check file. This fix also has the effect of correctly including
entity.guidvalues in the health check files. PR#3409 Issue#3408Bugfix: Fix
sidekiq.ignore_retry_errorsThe configuration option
sidekiq.ignore_retry_errors: truewas continuing to report retry errors. The agent now correctly ignores retry errors and only reports when jobs permanently fail. PR#3399
Important
Major Version Update: This version of the Ruby agent is a SemVer MAJOR update and contains breaking changes. MAJOR versions may drop support for language runtimes that have reached End-of-Life according to the maintainer. Additionally, MAJOR versions may drop support for and remove certain instrumentation. For more details on these changes please see the migration guide here.
Important
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.0.0
Breaking Change: Remove support for Ruby 2.4 and 2.5
Support for Ruby versions 2.4 and 2.5 has been removed. The new minimum required Ruby version is now 2.6. PR#3314
Breaking Change: Removal of Cross Application Tracing (CAT)
Previously, Cross Application Tracing (CAT) was deprecated in favor of Distributed Tracing. CAT functionality has now been removed. The configuration option
cross_application_tracer.enabledhas been removed. Public API methodsNewRelic::Agent::External.process_request_metadata,NewRelic::Agent::External.get_response_metadata,NewRelic::Agent::Transaction::ExternalRequestSegment#process_response_metadata,NewRelic::Agent::Transaction::ExternalRequestSegment#get_request_metadata, andNewRelic::Agent::Transaction::ExternalRequestSegment#read_response_headershave also been removed. PR#3333Breaking Change: Rename ActiveJob metrics and segments
ActiveJob metrics have been updated to include the job's class name for more specific reporting. This is a breaking change and may require updating custom dashboards or alerts. PR#3370 PR#3320
- Old format:
Ruby/ActiveJob/<QueueName>/<Method> - New format:
Ruby/ActiveJob/<QueueName>/<ClassName>/<Method>
In addition, segments created for Active Job enqueuing actions now include the job class.
- Old format:
ActiveJob/<QueueAdapter>/Queue/<Event>/Named/<QueueName> - New format:
ActiveJob/<QueueAdapter>/Queue/<Event>/Named/<QueueName>/<ClassName>
- Old format:
Breaking Change: Rename
bin/newreliccommand tobin/newrelic_rpmThe executable file for the agent's CLI has been renamed from
bin/newrelictobin/newrelic_rpm. This change resolves a name collision with the standalone New Relic CLI tool. PR#3323Breaking Change: Remove the
newrelic deploymentsCLI commandThe deprecated
newrelic deploymentsCLI command has been removed. To track changes and deployments in New Relic, please see our guide to Change Tracking for a list of available options. PR#3299Breaking Change: Remove the NewRelic::Agent::SqlSampler#notice_sql method
Users should call
NewRelic::Agent::Datastores.notice_sqlinstead. PR#3338Breaking Change: Remove unused arguments from various NewRelic::Agent::Datastores APIs
The following APIs from the
NewRelic::Agent::Datastoresclass have had method arguments removed:NewRelic::Agent::Datastores.notice_sql, previously had three positional arguments,query,scoped_metricandelapsed. Now, it only hasquery.NewRelic::Agent::Datastores.notice_statement, previously had two positional argumentsqueryandelapsed. Now it only hasquery.NewRelic::Agent::Datastores.wraprequires a proc. Previously the proc received three arguments: the result of the yield, the most specific scoped metric name, and the elapsed time of the call. Now, it only receives one: the result of the yield.
The values of the removed arguments are derived from the current segment at the time of the call. PR#3347
Breaking Change: Remove experimental feature Configurable Security Policies (CSP)
The experimental feature, Configurable Security Policies (CSP), is no longer supported and has been removed. PR#3292
Breaking Change: Remove support for Puma versions < 3.9.0
The minimum version of Puma now supported is 3.9.0 or higher. PR#3326
Breaking Change: Improve configuration validation and coercion
The internals used to coerce and validate the values provided for agent configuration are now more performant and more accurate.
- Warning messages will now be logged to the newrelic_agent.log file when nil is provided as a config value for a setting that does not support it.
- Integer values are permitted for Float configuration types
- Float values are permitted for Integer configuration types
- Fatal interruptions are prevented when a default value can be found to replace an invalid input value PR#3341
Breaking Change: Replace 'default' option with 'adaptive' for distributed tracing remote parent samplers
Previously, the default option for
distributed_tracing.sampler.remote_parent_sampledanddistributed_tracing.sampler.remote_parent_not_sampledwasdefault, which used the pre-existing adaptive sampler. Thedefaultoption has been renamed toadaptive. PR#3363Feature: Add
loggeras a dependencyThe
loggergem is now listed as a dependency of the agent to ensure continued logging functionality and support for Ruby 4.0.0 and newer versions. PR#3293Feature: Add Active Support notification allowlist configuration option
A new configuration option,
instrumentation.active_support_notifications.active_support_events, allows users to define an allowlist of Active Support notifications event names for the agent to subscribe to. By default, the agent subscribes to all Active Support: Caching and Active Support: Messages events. PR#3327Feature: Use Ruby's built-in Gzip compression
The agent now uses the built-in
Zlib.gzipmethod from the Ruby standard library for compression, replacing the previous custom implementation. PR#3332Feature: Add argument validation for the
NewRelic::Agent#record_custom_eventAPIThe
NewRelic::Agent#record_custom_eventAPI now raises anArgumentErrorwhen an invalidevent_typeis provided. A valid event type must consist only of alphanumeric characters, underscores (_), colons (:), or spaces (). PR#3319Feature: Add root sampling configuration options
You can now configure the sampling behavior for traces that originate within the current service using
distributed_tracing.sampler.root. PR#3330There are four modes available:
Mode Description adaptiveUses the existing adaptive sampler algorithm always_offMarks 0% of root traces as sampled always_onMarks 100% of root traces as sampled trace_id_ratio_basedSamples traces based on a ratio set in distributed_tracing.sampler.root.trace_id_ratio_based.ratio. The ratio must be float between 0.0 and 1.0Feature: Add Trace ID Ratio Based sampling options
The agent can now sample traces using the OpenTelemetry Trace ID Ratio Based sampler algorithm. PR#3330 This samples traces based on a probability between 0.0 and 1.0 based on the trace ID.
To use this option, you must first set your distributed tracing sampler configuration to
trace_id_ratio_basedand then set the correspondingdistributed_tracing.sampler.*.trace_id_ratio_based.ratiosampler to a Float between 0.0 and 1.0.For example:
distributed_tracing.sampler.remote_parent_sampled: 'trace_id_ratio_based'distributed_tracing.sampler.remote_parent_sampled.trace_id_ratio_based.ratio': 0.5This configuration would sample approximately 50% of your traces for all traces where the remote parent is sampled.
This option is available for:
distributed_tracing.sampler.rootdistributed_tracing.sampler.remote_parent_sampleddistributed_tracing.sampler.remote_parent_not_sampled
Feature: Add Entity GUID to Agent Control health check files
When the agent is started within an Agent Control environment, a health check file is created at the configured file location for every agent process. This file now includes the guid of the entity related to the agent when available. PR#3371
Bugfix: Resolve a
NoMethodErrorin GCP utilization detection.The GCP metadata discovery logic will now gracefully handle
nilor unexpected values, preventing service initialization crashes. PR#3388