• /
  • EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

Instrumented Python packages

This document lists the packages and modules automatically instrumented by the Python agent after you install it. You can also use custom instrumentation if you want to:

  • Disable instrumentation for specific packages or modules if the instrumentation interferes with your app.
  • Instrument a-third party package or module that is not instrumented automatically by the agent.
  • Add more specific instrumentation for your own code, such as to track the time spent in additional functions.

To request built-in instrumentation for additional packages, get support at support.newrelic.com.

Web frameworks

Backend services

Template rendering

GraphQL Frameworks

The Python agent provides insight into your GraphQL application's operations and resolvers and reports GraphQL-specific metrics and span attributes. For more information on transaction naming and other features, please view our GraphQL documentation. As of agent version 6.10.0.165, the agent supports the following GraphQL frameworks:

Instance details

The agent collects instance details for a variety of databases and database drivers. The ability to view specific instances and the types of database information depends on your Python agent version.

Python agent version 2.72.0.52 or higher supports the following:

Database

Python package name

Minimum package version

Minimum agent version

PostgreSQL

psycopg

3.0

9.11.0

PostgreSQL

psycopg2

2.0.14

2.72.0.52

MySQL

MySQLdb

1.2.5

2.74.0.54

Redis

redis

2.6.2

2.74.0.54

Redis

aredis

1.1.4

7.6.0.173

Redis

aioredis

1.3.1

7.14.0.177

Memcached

python-memcached

1.51

2.76.0.55

aiomcache

aiomcache

0.8.2

9.12.0

Elasticsearch

elasticsearch

0.45

2.78.0.56

To request instance-level information from datastores currently not listed for your agent, get support at support.newrelic.com.

SQL database adapters

For Python DB-API 2.0 compliant modules listed in this section, the Python agent supports:

  • Timing of database queries
  • Capturing SQL for the database query
  • Capturing a stack trace for long database queries
  • MySQL and PostgreSQ only: Capturing explain plans for slow database queries

The Python agent should be able to track database queries for any Python DB-API 2.0 compliant modules. However, the Python agent only officially supports the modules listed in this section.

For the following database adapters, we provides additional instrumentation for functionality outside of the DB-API 2.0 specification, such as shortcut methods to execute queries without creating cursors:

If your database client module is not listed in this section, get support at support.newrelic.com. New Relic Support may be able to suggest a temporary change to your config file to get it working.

NoSQL database clients

Timing of calls made against NoSQL databases are provided for the following client modules.

Elasticsearch clients

Time spent in calls made to Elasticsearch will be listed in both the main overview chart, as well as in the Databases tab in the UI.

Memcache clients

Timing of memcache requests and capture of type of request is provided for the following memcache client modules.

Solr service clients

Timing of Solr service requests and type of request is provided for the following Solr client modules.

Message broker clients

Timing of message broker transactions is provided for the following modules.

External web services

Timing of external web service requests is carried out via the following modules.

Machine learning models and LLMs

Copyright © 2024 New Relic Inc.

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