feat(pyroscope): add Grafana Pyroscope component#62
Conversation
Wrap pyroscope-go with YAML config, lifecycle shutdown, log adapter, default tags, and a runnable example. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a new pyroscope component to integrate Grafana Pyroscope continuous profiling into Go services, complete with configuration, context tagging, logging adapters, unit tests, and an example. Feedback focuses on improving reliability: first, by avoiding a startup panic if the Pyroscope profiler fails to initialize (since profiling is non-critical, it should fail gracefully and return a disabled client); second, by adding a defensive nil check in mergeConfig to prevent potential panics when a nil configuration is provided.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Log disabled/skipped paths, startup config summary, flush, and graceful shutdown via lifecycle hooks. Co-authored-by: Cursor <cursoragent@cursor.com>
Return a disabled client when profiler startup fails and guard mergeConfig against nil input. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
component/pyroscopewrappinggithub.com/grafana/pyroscope-gofor continuous profilingBeforeStopshutdown, zerolog adapter, default service tags, andTagWrapperre-exportsTest plan
go test ./component/pyroscope/...go build ./component/pyroscope/example/make lintPYROSCOPE_SERVER=http://localhost:4040 go run ./component/pyroscope/example)Made with Cursor