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. The Python agent version 6.6.0.162 and higher 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:
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.
- cx_Oracle
- MySQLdb
- oursql
- proboscis
- psycopg2
- psycopg2ct
- psycopg2cffi
- pymysql
- pyodbc
- ibm_db_dbi
- mysql-connector-python
- py-postgresql
- pymssql
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.
- aiobotocore
- aiohttp
- botocore
- dropbox
- facepy
- feedparser
- gRPC
- httplib
- httplib2
- httpx
- pywapi
- requests
- urllib
- urllib2
- urllib3
- xmlrpclib