Setting the file. One moment.
Subchapter 65.6
references/python.mdMarkdown692 BView on GitHub
Use the shared environment variables guidance in SKILL.md Step 4: set DD_SERVICE, DD_ENV, DD_VERSION.
Add ddtrace to the project’s dependencies (pip install ddtrace).
Run the app under ddtrace-run with profiling enabled:
DD_PROFILING_ENABLED=true DD_ENV=<ENV> DD_SERVICE=<SERVICE_NAME> DD_VERSION=<VERSION> \
ddtrace-run python app.pyWhen ddtrace-run cannot wrap the entrypoint, start ddtrace.profiling.Profiler(env=..., service=..., version=...).start() as early as possible in the program, before other imports.
On Alpine, gcc musl-dev linux-headers may be needed if no binary wheel is available.