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

この機械翻訳は、参考として提供されています。

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

問題を作成する

Ruby エージェント 8.x から 9.x への移行ガイド

移行の準備ができたら、Ruby エージェントの 8.x シリーズと 9.x シリーズの間の主な変更点を確認してください。バージョン 9.x への移行を確実に成功させるために、アップグレード中に直面する可能性のある問題についても学びます。

概要

主な変更点は以下の通りです。

詳細については、 9.0 のマイルストーン を参照してください。

非推奨の構成を削除

次の構成オプションは削除されたため、機能しなくなります。以下にリストされている置換を使用するようにすべての構成を更新してください。詳細については、 構成ドキュメントを 参照してください。

削除

置き換え

newrelic.yml

analytics_events.capture_attributes

transaction_events.attributes.enabled

transaction_events.attributes.enabled: false

browser_monitoring.capture_attributes

browser_monitoring.attributes.enabled

browser_monitoring.attributes.enabled: false

error_collector.capture_attributes

error_collector.attributes.enabled

error_collector.attributes.enabled: false

resque.capture_params

attributes.include

attributes.include: ['job.resque.args.*']

sidekiq.capture_params

attributes.include

attributes.include: ['job.sidekiq.args.*']

transaction_tracer.capture_attributes

transaction_tracer.attributes.enabled

transaction_tracer.attributes.enabled: false

error_collector.ignore_errors

error_collector.ignore_classes

error_collector.ignore_classes: ['ActionController::RoutingError', 'CustomError']

analytics_events.enabled

transaction_events.enabled

transaction_events.enabled: false

analytics_events.max_samples_stored

transaction_events.max_samples_stored

transaction_events.max_samples_stored: 1200

disable_database_instrumentation

disable_sequel_instrumentation

disable_sequel_instrumentation: true

disable_bunny

instrumentation.bunny

instrumentation.bunny: disabled

disable_curb

instrumentation.curb

instrumentation.curb: disabled

disable_dj

instrumentation.delayed_job

instrumentation.delayed_job: disabled

disable_excon

instrumentation.excon

instrumentation.excon: disabled

disable_grape

instrumentation.grape

instrumentation.grape: disabled

disable_grape_instrumentation

instrumentation.grape

instrumentation.grape: disabled

disable_httpclient

instrumentation.httpclient

instrumentation.httpcient: disabled

disable_httprb

instrumentation.httprb

instrumentation.httprb: disabled

disable_dalli

instrumentation.memcache

instrumentation.memcache: disabled

disable_dalli_cas_client

instrumentation.memcache

instrumentation.memcache: disabled

disable_memcache_client

instrumentation.memcache-client

instrumentation.memcache-client: disabled

disable_memcache_instrumentation

instrumentation.memcache

instrumentation.memcache: disabled

disable_memcached

instrumentation.memcached

instrumentation.memcached: disabled

disable_mongo

instrumentation.mongo

instrumentation.mongo: disabled

disable_net_http

instrumentation.net_http

instrumentation.net_http: disabled

prepend_net_instrumentation

instrumentation.net_http

instrumentation.net_http: prepend

disable_puma_rack

instrumentation.puma_rack

instrumentation.puma_rack: disabled

disable_puma_rack_urlmap

instrumentation.puma_rack_urlmap

instrumentation.puma_rack_urlmap: disabled

disable_rack

instrumentation.rack

instrumentation.rack: disabled

disable_rack_urlmap

instrumentation.rack_urlmap

instrumentation.rack_urlmap: disabled

disable_redis

instrumentation.redis

instrumentation.redis: disabled

disable_redis_instrumentation

instrumentation.redis

instrumentation.redis: disabled

disable_resque

instrumentation.resque

instrumentation.resque: disabled

disable_sinatra

instrumentation.sinatra

instrumentation.sinatra: disabled

disable_rake

instrumentation.rake

instrumentation.rake: disabled

disable_rake_instrumentation

instrumentation.rake

instrumentation.rake: disabled

disable_typhoeus

instrumentation.typhoeus

instrumentation.typhoeus: disabled

Ruby 2.2 および 2.3 のサポートを削除

Ruby 2.2 および 2.3 は、Ruby エージェントでサポートされなくなりました。最新の Ruby エージェント バージョンを引き続き使用するには、Ruby 2.4.0 以降に更新してください。

New Relic は、Ruby 言語開発チーム (Ruby チーム) が提供する正式にサポートされているメンテナンス期間が終了した後も、特定の古い Ruby バージョンを引き続きサポートします。たとえば、2023 年 3 月 31 日の時点で、Ruby チームがサポートする最も古い Ruby バージョンはバージョン 3.0 になりますが、Ruby エージェント バージョン 9.0 では、Ruby バージョン 2.4 以降が引き続きサポートされます。Ruby バージョンの公式 Ruby チーム サポートの詳細については、 Ruby Maintenance Branchesを参照してください。

デフォルトでスレッドトレースを有効にしました

構成オプション instrumentation.thread.tracing がデフォルトで有効になりました。この構成により、エージェントはスレッド内で発生するコードを監視できます。Ruby エージェント 9.0 は、インストルメント化されたコードをスレッド内に記録し、それを現在のトランザクションに関連付けます。

現在カスタム スレッド インストルメンテーションを使用している場合、これは重大な変更になる可能性があります。スレッド内の新しいトランザクションは、既に存在する場合は開始されなくなりました。

古い UI を使用している場合、トランザクション チャートに「#」という名前のセグメントが表示されることがあります。セグメント テーブルを見ると、フル ネームは「Thread: #」です。これらのセグメントは、スレッド インストルメンテーションを参照します。詳細については、 Issue #1859 を参照してください。

非推奨のインストルメンテーションを削除

以下の計装された gem は、以前は非推奨であり、現在はサポートされていません。

  • Solrとして機能

  • オーソロジック

  • DataMapper

  • レインボーズ

  • Sunspot

    次のテクノロジのバージョンは、以前は非推奨であり、サポートされていません。

  • 乗客: 2.2.x - 4.0.x

  • プーマ: 2.0.x

  • ブドウ: 0.2.0

  • パドリーノ: 0.14.x

  • レール: 3.2.x

  • シナトラ: 1.4.x,1.5.x

  • モンゴ: 1.8.x - 2.3.x

  • 続編: 3.37.x、4.0.x

  • Delayed_Job: 2.0.x - 4.0.x

  • サイドキー: 4.2.x

  • Excon:0.55.0未満

  • HttpClient: 2.2.0 - 2.8.0

  • HttpRb: 0.9.9 - 2.2.1

  • 発疹チフス: 0.5.3 - 1.2.x

  • バニー: 2.0.x - 2.6.x

  • アクティブマーチャント: 1.25.0 - 1.64.x

更新された API メソッド set_transaction_name

メソッド NewRelic::Agent.set_transaction_name が呼び出されると、現在実行中のトランザクションの名前とカテゴリが、メソッドに渡されたものに常に変更されるようになりました。これは、以前のエージェント バージョンからの変更です。

以前は、トランザクションに既に割り当てられているカテゴリと一致しない新しいトランザクション名と新しいカテゴリで set_transaction_name が呼び出された場合、新しい名前もカテゴリもトランザクションに保存されませんでした。

以前はカテゴリの違いにより無視されていた状況でこのメソッドが呼び出された場合、トランザクションの名前とカテゴリが変更されます。

削除された API メソッド

非推奨の API メソッドNewRelic::Agent.disable_transaction_tracingが削除されました。代わりに、 NewRelic::Agent#ignore_transactionを使用して現在のトランザクションの記録を無効にするか、 NewRelic::Agent.disable_all_tracingを使用して後続の呼び出しでメトリックまたはトレースを収集せずにブロックを生成します。

Copyright © 2024 New Relic株式会社。

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