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

問題を作成する

current_trace_id (PythonエージェントAPI)

構文

newrelic.agent.current_trace_id()

現在のトランザクションのトレース ID を返すか、トランザクションが存在しない場合はNoneを返します。

説明

現在のトランザクションのトレース ID を取得するには、 current_trace_idを使用します。

戻り値

現在のトランザクションのトレース ID を返します。 アクティブなトランザクションがない場合は、 Noneを返します。

現在のトレース ID を取得する

import newrelic.agent
@newrelic.agent.background_task()
def main():
trace_id = newrelic.agent.current_trace_id()
Copyright © 2024 New Relic株式会社。

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