Installation
š Donāt forget to install the AppSignal for Python package in your application first.
opentelemetry-instrumentation-celery package. We also recommend installing the Redis instrumentation package. To add both instrumentation packages to your project, add the following lines to your requirements.txt file:
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.Setup
Celery requires some extra setup, as itās an application component thatās started separately. As shown in the example below, theappsignal module needs to be imported in the main file used to start Celery, and the appsignal.start() method needs to be called from a method with the @worker_process_init.connect decorator.
In the example below, this initialization takes place in the tasks.py file. This file may be named differently in your application.