Skip to main content

Installation

🐍 Don’t forget to install the AppSignal for Python package in your application first.
The installation instructions differ based on the MySQL adapter package you are using:
When using SQLAlchemy, do not install these instrumentation packages. The instrumentation for SQLAlchemy will automatically instrument queries to the underlying database. Installing both instrumentation packages will result in duplicate events.

Using mysql

When using the mysql-connector-python MySQL adapter package (which is imported as mysql), install the opentelemetry-instrumentation-mysql package. To add it to your project, add the following line to your requirements.txt file:

<PythonDisableInstrumentations />
# requirements.txt
opentelemetry-instrumentation-mysql

Using mysqlclient

When using the mysqlclient MySQL adapter package, install the opentelemetry-instrumentation-mysqlclient package. To add it to your project, add the following line to your requirements.txt file:
# requirements.txt
opentelemetry-instrumentation-mysqlclient

Using pymysql

When using the pymysql MySQL adapter package, install the opentelemetry-instrumentation-pymysql package. To add it to your project, add the following line to your requirements.txt file:
# requirements.txt
opentelemetry-instrumentation-pymysql