• 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.

問題を作成する

ロダ計測器

New Relic Ruby エージェントは、 Roda 3.19.0 以降を自動的にインストルメントします。

重要

Roda インストルメンテーションには、Ruby エージェント バージョン 9.4.0 以降が必要です。

はじめに

New Relic を使用して Roda アプリをセットアップするには:

  1. newrelic_rpm gem を Gemfile とバンドルに追加します。

    gem 'newrelic_rpm'
  2. Roda アプリで、Roda require ディレクティブの下に require 'newrelic_rpm'を追加します。例えば:

    require 'roda'
    require 'newrelic_rpm'
    class App < Roda
    route do |r|
    r.root do
    "Hello World!"
    end
    end
    end

ルートの無視

Ruby エージェント バージョン 9.6.0 以降では、特定のルートの無視がサポートされています。これらの値を指定するには、Roda アプリケーションの定義に使用するのと同じスタイルのルートを使用します。たとえば、Roda アプリでhello_worldルートを無視するには、 routeブロックの外側でnewrelic_ignore '/hello_word'を宣言します。

newrelic_ignore '/hello_world'
route do |r|
r.on '/hello_world' do
"Hello World!"
end
end

アプリケーション全体を無視する場合 (マウントされたアプリケーションなど)、パラメータを指定せずにnewrelic_ignoreを呼び出します。

newrelic_ignore

さらに、 newrelic_ignore_apdexnewrelic_ignore_enduserがサポートされています。

  • newrelic_ignore_apdex呼び出しは、特定のルートを Apdex 計算全体の考慮から除外します。
  • newrelic_ignore_enduser呼び出しは、ルートがレンダリングされるときのページ読み込みタイミング JavaScript の自動挿入を防ぎます。

重要

すべての newrelic_ignore* メソッドは、 routeブロックの外側で呼び出す必要があります。

ラックの計測器

ラックベースのフレームワークである Roda インスツルメンテーションは、正しく動作するために Rack インスツルメンテーションを必要とします。ラック計装はデフォルトで有効になっています。

Copyright © 2024 New Relic株式会社。

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