For a full list of Datadog’s Python version and framework support (including legacy and maintenance versions), read the Compatibility Requirements page.
After you install and configure your Datadog Agent, the next step is to add the tracing library directly in the application to instrument it. Read more about compatibility information.
To begin tracing applications written in Python, install the Datadog Tracing library, ddtrace, using pip:
pipinstallddtrace
Note: This command requires pip version 18.0.0 or greater. For Ubuntu, Debian, or another package manager, update your pip version with the following command:
pipinstall--upgradepip
Then to instrument your Python application use the included ddtrace-run command. To use it, prefix your Python entry-point command with ddtrace-run.
For example, if your application is started with python app.py then:
ddtrace-run python app.py
Once you’ve finished setup and are running the tracer with your application, you can run ddtrace-run --info to check that configurations are working as expected. Note that the output from this command does not reflect configuration changes made during runtime in code.
If needed, configure the tracing library to send application performance telemetry data as you require, including setting up Unified Service Tagging. Read Library Configuration for details.
The connection for traces can also be configured in code: