• EnglishEspañol日本語한국어Português
  • Log inStart now

Python event loop diagnostics

The Python agent supports asyncio event loop diagnostics. When there are transactions blocking or delaying an event loop, the agent is able to generate diagnostics to help find and resolve them.


Requires Python agent version or higher.

View in New Relic UI

In APM, your event loop transaction data will be in the transaction breakdown table and the trace details page.

Event loop metrics will appear in the transaction Breakdown table:

one.newrelic.com > APM & services > (select an app) > Transactions, click See transaction table, then select a transaction: The transaction’s Breakdown table flags event loops with asyncio.

Time spent waiting on other transactions will be shown in the transaction Trace details page:

one.newrelic.com APM & services > (select an app) > Transactions > (select a transaction trace) > Trace details: The Trace details page contains a table with breakdowns for each segment (method or function call) in a transaction trace.

Event Loop NRQL Queries

eventLoopTime and eventLoopWait attributes will be available via NRQL query. An example query might be:

SELECT count(*) as 'count', average(eventLoopTime) as 'loopTime', average(eventLoopWait) as 'loopWait' FROM Transaction facet name

Where to diagnose event loops

Event loop diagnostics will be available by default through our existing aiohttp, sanic, and Tornado instrumentation frameworks. Coroutines using the Python agent API background_task and web_transaction decorator APIs also support asyncio's event loops.

Copyright © 2024 New Relic Inc.

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