• 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 PHP エージェントで属性を使用する例を紹介します。これらの設定を使用するには

  1. 必要に応じて、 newrelic.ini ファイルを変更します。
  2. 変更を有効にするために、エージェントとそのデーモンを再起動します。

キャプチャーリクエストパラメーター

デフォルトでは、エージェントはリクエストパラメータをキャプチャしません。

次の構成を使用して、デフォルトの宛先 transaction_tracertransaction_events、および error_collectorのパラメーターのキャプチャを有効にすることができます。パラメータをキャプチャする宛先を制限する場合は、 「特定の宛先の選択」を参照してください。

構成。

newrelic.attributes.include = request.parameters.*

特定のリクエストパラメータのみを取得

特定のリクエスト パラメータのみをキャプチャするには、リストを attributes.includeに渡します。

構成:

newrelic.attributes.include = request.parameters.user_id request.parameters.product_id

すべてのアトリビュートを無効にする

この例では、属性が無効になっているため、includeとexcludeのリストは無視され、すべての属性がフィルタリングされます。

構成。

newrelic.attributes.enabled = false
newrelic.attributes.include = request.parameters.*

入力キー。

foo, bar, request.parameters.foo, request.parameters.bar

デスティネーションへの出力

transaction_tracer: none
error_collector: none
transaction_events: none
browser_monitoring: none

特定の目的地を選択する

この例では

  • トランザクション トレースでは、属性が無効になります。インクルード リストとエクスクルード リストは無視され、この宛先ではすべての属性がフィルタリングされます。

  • 属性も無効になります

    デフォルトでは。

  • リクエストパラメータ(プレフィックスがrequest.parameters. )は、すべての宛先でデフォルトでオフになっています。

その結果、トレースされたエラーとトランザクションイベントで送信されるのはbarのみです。

構成。

newrelic.attributes.enabled = true
newrelic.transaction_tracer.attributes.enabled = false
newrelic.attributes.exclude = foo

入力キー。

foo, bar, request.parameters.foo, request.parameters.bar

デスティネーションへの出力

transaction_tracer: none
error_collector: bar
transaction_events: bar
browser_monitoring: none

値と目的地の選択

この例では、特定の出力先には特定の入力キーが選択され、他の出力先には選択されません。

  • food.fruit.bananaキーは、トランザクショントレースからのみ除外されます。
  • foodキーとfood.breadキーはすべての宛先から除外されます。

構成。

newrelic.browser_monitoring.attributes.enabled = true
newrelic.attributes.exclude = food*
newrelic.attributes.include = food.fruit.*
newrelic.transaction_tracer.attributes.exclude = food.fruit.banana

入力キー。

food, food.bread, food.fruit.banana, food.fruit.apple

デスティネーションへの出力

transaction_tracer: food.fruit.apple
error_collector: food.fruit.banana, food.fruit.apple
transaction_events: food.fruit.banana, food.fruit.apple
browser_monitoring: food.fruit.banana, food.fruit.apple
Copyright © 2024 New Relic株式会社。

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