Expose the Go pprof HTTP endpoint by importing net/http/pprof and ensuring the pprof routes are registered on the service's HTTP server
Configure Grafana Alloy (or a Pyroscope scrape target) to scrape the /debug/pprof/ endpoints at a defined scrape interval using the pyroscope.scrape component
Tag profiles with service.name and version labels in the Alloy scrape configuration so profiles are queryable by service identity
Enable trace-profile correlation by embedding Pyroscope labels in spans: use the otel-profiling integration to attach profile_id as a span attribute
In Grafana, link the Pyroscope datasource to the Tempo datasource so clicking a trace span opens the matching CPU profile for that time window
Known gotchas
pprof pull mode samples the entire process; high scrape frequency (below 10s) increases CPU overhead from the profiling itself
Go's pprof mutex and block profilers are disabled by default and must be enabled with runtime.SetMutexProfileFraction and runtime.SetBlockProfileRate before useful data appears
Profile-trace correlation requires synchronized clocks between the service and the profiling backend; clock drift produces time windows that do not align with trace timestamps
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