중요
最新のエージェント バージョンが利用可能になったらすぐに更新することをお勧めします。最新バージョンにアップグレードできない場合は、エージェントを 90 日以内のバージョンに更新してください。エージェントを最新の状態に保つ方法の詳細については、こちらをご覧ください。
エージェントのリリースとサポート日については、New Relic Ruby エージェントのEOL ポリシーを参照してください。
v10.7.1
バグ修正: Dalli 5.1.0でのマルチキー操作におけるArgumentErrorを解決しました。
この修正により、マルチ操作およびパイプライン操作においてオプションのリクエストオプション引数を受け入れて転送するように、Dalliの計装が更新されます。修正を提供していただいた@dbackeusに感謝します! PR#3642
バグ修正: セグメントの開始に失敗したときに、Async::HTTP requestsが
NoMethodErrorを発生させなくなりました。エージェントが
Async::HTTPリクエストのセグメントを作成中に内部エラーに遭遇した場合、計装はその欠落したセグメントをそのまま使用し、NoMethodErrorを発生させる可能性がありました。この問題は修正されました。@ydahに感謝します。PR#3640
중요
最新のエージェント バージョンが利用可能になったらすぐに更新することをお勧めします。最新バージョンにアップグレードできない場合は、エージェントを 90 日以内のバージョンに更新してください。エージェントを最新の状態に保つ方法の詳細については、こちらをご覧ください。
エージェントのリリースとサポート日については、New Relic Ruby エージェントのEOL ポリシーを参照してください。
v10.7.0
機能: transaction_tracer.cap_segment_artifactsを追加設定オプション
多数のセグメントを持つ長時間実行されるトランザクションは、トランザクションの存続期間中、メモリ使用量を継続的に増加させる可能性があります。エージェントは、オプトインの
transaction_tracer.cap_segment_artifacts設定オプションを提供するようになりました(デフォルトはfalseです)。有効にすると、transaction_tracer.limit_segmentsに達した時点で、エージェントはそのトランザクションで後から作成されたセグメントの排他的時間の記録も停止します。これにより、トランザクションのタイミングデータの精度は低下しますが、メモリ使用量は削減されます。PR#3615機能: Puma server-statisticsの計装を追加
エージェントは、Pumaのクラスタ全体のサーバー統計をサンプリングし、
backlog、running、pool_capacity、max_threads、およびrequests_countを含むRuby/Puma/*タイムスライスメトリクスとして報告するようになりました。統計は、シングルモード、およびpreload_app!が有効な場合はクラスタモードでサンプリングされます。この計装はデフォルトで無効になっています。有効にするには、disable_puma_instrumentationをfalseに設定します。有効にすると、エージェントはこれらのメトリクスを配信するためにPumaマスタープロセスでレポートスレッドを開始し、Pumaワーカーと並行して追加のエージェント接続を実行します。サンプリング間隔は、新しいpuma.sample_rate設定(デフォルトは60秒)で設定可能です。Puma 6.6以降が必要です。詳細については、ドキュメントをご覧ください。PR#3578機能:Google Cloud Runインスタンスの一意のホスト名を報告する
エージェントはCloud Runを検出し、個々のインスタンスを区別できるように、GCPインスタンスIDをホスト名として報告するようになりました。この変更前は、すべてのGoogle Cloud Runのホスト名は
localhostでした。この機能は、新しいutilization.gcp_cloud_run.use_instance_as_host設定オプション(デフォルトはtrue)によって制御されます。ホスト名を代わりに{K_REVISION}-{instance id}として報告するには、utilization.gcp_cloud_run.include_revision_in_host(デフォルトはfalse)をtrueに設定します。ここで、K_REVISIONはCloud Runのリビジョン名です。Issue#3295 PR#3609バグ修正: transaction_tracer.limit_segmentsの後にスローSQLが記録されなくなりました超過
トランザクションが
transaction_tracer.limit_segmentsを超えた後でも、その後に作成されたデータストアセグメントで引き続きスローSQLが記録される可能性がありました。制限に達した後に作成されたセグメントについて、エージェントはスローSQLの記録を停止するようになりました。PR#3615バグ修正:マルチデータベースのRailsアプリ(Rails>=7.2)で、実行計画が誤ったデータベースをターゲットにする可能性がありました。
Rails 7.2+では、エージェントは専用の接続ではなく、アプリのデフォルト/共有プールからの接続を使用して実行計画を収集していました。これは主にマルチデータベースアプリに影響を与えました。実行計画が誤ったデータベースに対して生成される可能性があり、実行計画が失敗すると共有接続が不正な状態のままになり、無関係なrequestsに影響を与える可能性がありました。エージェントは、Rails 7.2以前と同様に、実行計画に独自の専用接続を使用するようになり、実行計画の試行が失敗するたびにその接続をリセットまたは破棄するため、不正な接続が再利用されることはありません。Issue#3610 PR#3612
バグ修正: ブラウザ監視の計装が以下で失敗しなくなりました
FrozenError応答本文の最初のフラグメントがフリーズされた
Stringであり、複数のフラグメントが存在する場合、ブラウザの計装がFrozenErrorにヒットし、ブラウザのタイミングヘッダーが挿入されませんでした。これは、コンパイルされた文字列をより多くフリーズするようになったERB6.0.3+で発生し始めました。この問題は修正されました。Issue#3624 PR#3625バグ修正:すべての文字種を許可するようにブール値の設定値を正規化
バージョン9.xでは、エージェントは"FALSE"のような大文字のブール値や、"True"のような大文字と小文字が混在する値を受け入れていました。バージョン10.0.0にはPR#3341が含まれており、これにより大文字と小文字を区別しない要件が意図せず削除されていました。これにより、すべて小文字以外の文字種を使用していたユーザーは、設定オプションがデフォルトにフォールバックしていました。現在、エージェントは再び大文字と小文字を区別しないチェックを使用するようになりました。Issue#3632 PR#3633
중요
最新のエージェント バージョンが利用可能になったらすぐに更新することをお勧めします。最新バージョンにアップグレードできない場合は、エージェントを 90 日以内のバージョンに更新してください。エージェントを最新の状態に保つ方法の詳細については、こちらをご覧ください。
エージェントのリリースとサポート日については、New Relic Ruby エージェントのEOL ポリシーを参照してください。
v10.6.0
機能:HybridエージェントでSpanLinkイベントがサポートされるようになりました
OpenTelemetry APIによって作成されたスパンに、スパンリンクを関連付けることができるようになりました。リンクは、スパンの開始時に
links引数に渡すか、OpenTelemetry::Trace::Span#add_linkAPIを呼び出すことで追加できます。PR#3586機能:HybridエージェントでSpanEventイベントがサポートされるようになりました
OpenTelemetry APIによって作成されたスパンに、
OpenTelemetry::Trace::Span#add_eventAPIを介してSpanEventイベントを関連付けることができるようになりました。SpanEventイベントは、スパン上のタイムスタンプ付きアノテーションをキャプチャし、親スパンと一緒にNew Relicに送信されます。PR#3587機能:すべてのHybridエージェントスパンにスパンの種類を設定
以前は、外部リクエストセグメントまたはデータストアセグメントに変換されたOpenTelemetryスパンのみが、スパンの種類を属性として追加していました。現在、エージェントは、値が利用可能なすべてのOpenTelemetryスパンにスパンの種類を追加します。PR#3589
機能: OpenTelemetry::Tracer#start_root_spanのサポートを追加
スパンの種類が
:serverまたは:consumerである場合、OpenTelemetry::Tracer#start_root_spanAPIを使用して、指定されたスパンのトランザクションを強制的に開始できるようになりました。その他のスパンの種類については、何もしません。このメソッドは、バックグラウンドジョブの計装で最も一般的に使用されます。PR#3588バグ修正:
instrumentation.rails_event_logger: falseが計装を無効にしない問題を修正以前は、
instrumentation.rails_event_loggerをfalseに設定しても、期待どおりにRails.eventの計装が無効になりませんでした;Railsの起動中に引き続きインストールされていました。現在は修正されています。PR#3564バグ修正:計装設定キーのブール値のような値を
disabledに正規化以前は、
disabledのみがinstrumentation.*設定キーをオフにしていました。現在は、false、no、またはoffなどのブール値のような値もdisabledに解決され、計装がインストールされるのを防ぎます。PR#3579バグ修正:ライブラリごとのロギングサポートアビリティメトリクスに、各ライブラリの計装状態が反映されるようになりました
以前は、
Supportability/Logging/Ruby/{library}/{enabled|disabled}メトリクスは各ライブラリの実際の状態ではなく、すべてのライブラリに対してグローバルなapplication_logging.enabled設定の値を報告していました。その結果、特定のライブラリのロギング計装を無効にしていた場合や、そのライブラリのgemをまったく使用していなかった場合でも、メトリクスはenabledを報告していました。現在、各ライブラリのメトリクスは、自身のロギング計装が有効になっているかどうかを反映しています。PR#3571
중요
最新のエージェント バージョンが利用可能になったらすぐに更新することをお勧めします。最新バージョンにアップグレードできない場合は、エージェントを 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
중요
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
중요
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