• EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

Te ofrecemos esta traducción automática para facilitar la lectura.

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.

Crea una propuesta

current_trace_id (API del agente Python)

Sintaxis

newrelic.agent.current_trace_id()

Devuelve el ID de la traza de la transacción actual o None si no existe ninguna transacción.

Descripción

Utilice current_trace_id para recuperar el ID de traza de la transacción actual.

Valores de retorno

Devuelve el ID de la traza de la transacción actual. Devuelve None si no hay ninguna transacción activa.

Ejemplos

Obtener el ID de la traza actual

import newrelic.agent
@newrelic.agent.background_task()
def main():
trace_id = newrelic.agent.current_trace_id()
Copyright © 2024 New Relic Inc.

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