Example applications built to try out Datadog APM.
To run these examples (without having to deploy to a cloud host), make sure you have the Datadog Agent installed and running locally. (Personally, I installed the Agent on my Mac following the instructions here.)
Traces may take a few minutes to show up in the APM UI.
ddtrace-run python -m apps.flask
(e.g. Starlette.)
ddtrace-run uvicorn apps.starlette:app
The Flask application, which is taken from the Tracing Quickstart guide, is auto-instrumented by dd-trace-py
. Running with ddtrace-run ...
automatically patches flask
, which has the effect of sending traces to Datadog on each HTTP request.
The ASGI application is instrumented via the TraceMiddleware
provided by ddtrace-asgi. It, too, sends traces to Datadog on each HTTP request made to the application.