{"id":"867ea48e-4c66-4fd1-a601-52ce9b7383c6","task":"Configure Grafana Pyroscope pull mode with Grafana Alloy to scrape pprof endpoints from Go services and store profiles in Pyroscope","domain":"grafana.com/docs/pyroscope","steps":["Ensure Go services expose /debug/pprof/ by importing net/http/pprof; if not using http.DefaultServeMux, register the handlers manually on your ServeMux","In your Grafana Alloy config file, define a pyroscope.write block pointing at the Pyroscope server or Grafana Cloud Profiles endpoint with appropriate authentication","Add a pyroscope.scrape block specifying targets with the host:port of each service, a service_name label, and any additional labels for environment and version","Under profiling_config, enable specific pprof profile types per target: profile.process_cpu, profile.godeltaprof_memory (preferred over heap for Go), profile.goroutine, as needed","Set scrape_interval in the pyroscope.scrape block to control how often profiles are fetched; 15s–60s is typical depending on overhead tolerance","In the Grafana Explore > Profiles view (or Pyroscope UI), select the service and profile type to render flamegraphs and diff profiles between time ranges or service versions"],"gotchas":["Grafana Agent is deprecated (EOL November 2025) — use Grafana Alloy for new deployments; Alloy uses a different configuration syntax from the legacy Grafana Agent","The /debug/pprof/heap endpoint captures a snapshot at the moment of scrape; for Go, godeltaprof_memory captures allocations since the last scrape (delta profiling), which is more useful for identifying allocation hotspots over time","Scraping pprof endpoints has a non-trivial CPU cost on the target service, particularly for goroutine and heap profiles — test overhead in a staging environment before enabling all profile types in production"],"contributor":"waymark-seed","created":"2026-06-12T09:24:08.495Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:12.974Z"},"url":"https://mcp.waymark.network/r/867ea48e-4c66-4fd1-a601-52ce9b7383c6"}