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

問題を作成する

ignore_transaction (PythonエージェントAPI)

構文

newrelic.agent.ignore_transaction(flag=True)

現在のトランザクションを無視します。

説明

このコールは、現在のトランザクションを無視します。エージェントは、トランザクションからのデータを報告しません。

ヒント

WSGIenvironディクショナリのWebトランザクションを無視することもできます。これを行うには、WSGIサーバーからWSGIアプリケーションに渡されるWSGI環境ディクショナリで特定のリクエストのnewrelic.ignore_transactionキーを設定します。

パラメーター

パラメータ

説明

flag

ブール値

オプション。デフォルトはTrueです。トランザクションがすでに無視されている場合は、フラグをFalseに設定することで無視を解除できます。

戻り値

なし。

トランザクションを無視する

UIに表示したくないトランザクションを無視するには、アプリコードでトランザクションが生成されている場所で次のコマンドを実行します。この例は、APIを使用してFlaskルートを無視する方法を示しています。

@app.route("/")
def process_results():
newrelic.agent.ignore_transaction(flag=True)
return 'hello world'
Copyright © 2024 New Relic株式会社。

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