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

問題を作成する

Python属性の例

属性 をPythonエージェントで使用した例をご紹介します。

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

デフォルトでは、リクエスト パラメータのキャプチャは有効になっていません。次の構成では、デフォルトの宛先transaction_tracertransaction_events 、およびerror_collectorのパラメーター キャプチャがオンになります。宛先を制限するには、特定の宛先の選択の例を参照してください。

構成。

attributes.include = request.parameters.*

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

特定のリクエスト パラメータのみを取得するには、リストをattributes.includeに渡すだけです。

構成:

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

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

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

構成。

attributes.enabled = false
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のみです。

構成。

attributes.enabled = true
transaction_tracer.attributes.enabled = false
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キーはすべての宛先から除外されます。

構成。

browser_monitoring.attributes.enabled = true
attributes.exclude = food*
attributes.include = food.fruit.*
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.