SQLAlchemy Instrumentation

This feature requires AppSignal for Python version 1.3.1 or higher.

Installation

Don't forget to install the AppSignal for Python package in your application first.

When using SQLAlchemy, do not install the instrumentation packages for the underlying database adapter (such as those for MySQL, PostgreSQL or SQLite). The instrumentation for SQLAlchemy will automatically instrument queries to the underlying database. Installing both instrumentation packages will result in duplicate events.

Install the opentelemetry-instrumentation-sqlalchemy package. To add it to your project, add the following line to your requirements.txt file:

Shell
# requirements.txt opentelemetry-instrumentation-sqlalchemy

The AppSignal for Python integration will automatically use this instrumentation when the corresponding package is installed. To disable this instrumentation without uninstalling the package, use the disable_default_instrumentations configuration option.