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

問題を作成する

get_linking_metadata (Python エージェント API)

構文

get_linking_metadata()

ログメッセージで使用するコンテキストデータの辞書を返します。

要件

Pythonエージェントバージョン5.4.0以上

説明

文脈情報を提供するキー/値ペアの辞書。このAPIは、手動ロギングのためにエージェントのメタデータを追加するために使用することができます。

戻り値

辞書を返します。

import json
import newrelic.agent
log_message = {"message": "Hello World"}
context = newrelic.agent.get_linking_metadata()
log_message.update(context)
print(json.dumps(log_message))
Copyright © 2024 New Relic株式会社。

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