Logging is here!

Tracing Python Applications

Installation

To begin tracing applications written in Python, first install and configure the Datadog Agent.

Next, install the Datadog Tracing library using pip:

pip install ddtrace

Finally, import the tracer and instrument your code!

Example

For Python applciations, note that tracing is disabled when your application is launched in DEBUG mode. Find more here.
from ddtrace import tracer

with tracer.trace("web.request", service="my_service") as span:
  span.set_tag("my_tag", "my_value")

For more examples, see the Getting Started section of library documentation.

Compatibility

Framework Compatibility

The ddtrace library includes support for a number of web frameworks, including:


Library Compatibility

It also includes support for the following data stores and libraries:


Further Reading