Ensure Datadog Agent v7+ is running with APM enabled (DD_APM_ENABLED=true) and listening on the default port
For Python: install ddtrace, then launch with DD_PROFILING_ENABLED=true DD_ENV=prod DD_SERVICE=my-service DD_VERSION=1.0.0 ddtrace-run python app.py
For Go: import gopkg.in/DataDog/dd-trace-go.v1/profiler, call profiler.Start with profiler.WithService, profiler.WithEnv, and the profile types you want (e.g., profiler.CPUProfile, profiler.HeapProfile), and defer profiler.Stop()
Deploy and let the profiler run for at least a few minutes, then navigate to APM > Profiles in the Datadog UI to see flamegraphs per service
Use the Code Hotspots tab on a slow trace to jump from a specific span directly to the profile that was active during that request
Tag profiles with DD_VERSION to compare profiles across deploys and catch regressions
Known gotchas
Continuous Profiler is not enabled by default when you install the APM tracing library — you must explicitly set DD_PROFILING_ENABLED=true or call profiler.Start in code
For Python, ddtrace-run patches the process at startup; if you use a custom entry point (e.g., gunicorn), pass --import=ddtrace.auto instead
Profile data is sent to the Agent, not directly to the Datadog backend; if the Agent is unreachable the profiler will buffer and eventually drop data silently
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp