• 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(파이썬 에이전트 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 Inc.

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