grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.96k stars 3.46k forks source link

"Unknown profile" in alloy of pyroscope.scrape godeltaprof_memory after loki 3.1 -> 3.2 update #14209

Open pulchart opened 2 months ago

pulchart commented 2 months ago

Describe the bug

Loki was updated from 3.1.1 to 3.2.0, alloy pyroscope.scrape godeltaprof_memory starts to report:

alloy[1690885]: ts=2024-09-20T12:04:57.99406186Z level=error msg="fetch profile failed" component_path=/ component_id=pyroscope.scrape.godeltaprof_memory scrape_pool=pyroscope.scrape.godeltaprof_memory target="{instance=\"10.15.129.5:3100\", service_name=\"loki\"}" err="server returned HTTP status (404) Unknown profile"

To Reproduce Steps to reproduce the behavior:

  1. run loki 3.2
  2. curl <ip>:3100/debug/pprof/delta_heap/ Unknown profile

Expected behavior no "Unknown profile" like with loki 3.1

Environment: bare-metal

Screenshots, Promtail config, or terminal output

Alloy config

pyroscope.scrape "godeltaprof_memory" {
  targets    = [
    {"__address__" = "10.15.129.5:3100", "service_name" = "loki"},
  ]
  forward_to = [pyroscope.write.pyroscope_write.receiver]

  profiling_config {
    profile.process_cpu { enabled = false }
    profile.godeltaprof_memory { enabled = true }
    profile.memory { enabled = false } // disable memory, use godeltaprof_memory instead
    profile.godeltaprof_mutex { enabled = false }
    profile.mutex { enabled = false } // disable mutex, use godeltaprof_mutex instead
    profile.godeltaprof_block { enabled = false }
    profile.block { enabled = false } // disable block, use godeltaprof_block instead
    profile.goroutine { enabled = false }
  }
}