feat: comprehensive Pyroscope profiling for Ethereum clients#1302
Draft
feat: comprehensive Pyroscope profiling for Ethereum clients#1302
Conversation
- Add Pyroscope service as an optional additional_service - Enable pprof on Geth (port 6060) for Go runtime profiling - Prysm already has pprof enabled by default - Add pyroscope_params configuration (image, scrape_interval, resources) - Add Go Runtime Profiling Grafana dashboard showing: - Memory usage (allocated, heap, stack) - GC metrics (duration rate, frequency) - Goroutines and OS threads - Memory allocation rate and heap objects Usage: ```yaml additional_services: - pyroscope - prometheus_grafana pyroscope_params: scrape_interval: "15s" # optional, default 15s ``` When Pyroscope is enabled, it automatically scrapes pprof endpoints from: - Geth (EL): http://<geth-service>:6060/debug/pprof/ - Prysm (CL): http://<prysm-service>:6060/debug/pprof/
Grafana Pyroscope server doesn't support scraping directly - it requires Grafana Alloy for that. This commit simplifies the deployment to just run Pyroscope as a storage/query backend, and logs available pprof endpoints for users to access directly or configure with Alloy.
…ana integration This commit adds continuous profiling support for Ethereum clients: Pyroscope Integration: - Launch Pyroscope early (before EL/CL) for native SDK support - Download Pyroscope Java Agent for JVM-based clients - Add Reth pprof support (requires profiling image) Client-specific profiling: - Geth: Native Pyroscope SDK (push-based, automatic) - Erigon/Prysm: pprof scraping via Grafana Alloy - Besu/Teku: Pyroscope Java Agent for JFR profiles - Reth: pprof heap endpoint (with profiling image) - Lighthouse: OTEL traces to Tempo (no profiling) Grafana Integration: - Add Pyroscope as datasource - Configure Tempo trace-to-profile linking - Update profiling dashboard with flame graphs - Add sections for Go, JVM, and jemalloc metrics Alloy pprof Scraping: - New Alloy service for continuous pprof collection - Scrapes CPU, memory, goroutine, mutex, block profiles - Pushes to Pyroscope for unified profile storage Config fixes: - Fix Tempo config format for newer versions - Increase Pyroscope limits for JFR profiles (500MB) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive continuous profiling support for Ethereum clients using Grafana Pyroscope, with automatic integration into Grafana dashboards.
Profiling Support Matrix
Key Changes
Usage
For Reth profiling, use the profiling image:
Files Changed
main.star- Early Pyroscope launch, Alloy integration, Grafana pyroscope_urlsrc/pyroscope/pyroscope_launcher.star- Java agent download, early launch functionsrc/alloy/alloy_launcher.star- New Alloy service for pprof scrapingsrc/el/besu/besu_launcher.star- Pyroscope Java Agent integrationsrc/cl/teku/teku_launcher.star- Pyroscope Java Agent integrationsrc/grafana/grafana_launcher.star- Pyroscope URL parameterstatic_files/grafana-config/templates/datasource.yml.tmpl- Pyroscope datasource + trace linkingstatic_files/grafana-config/dashboards/profiling-dashboard.json- Updated with flame graphsstatic_files/alloy/config.alloy.tmpl- Alloy pprof scraping configstatic_files/tempo-config/tempo.yaml.tmpl- Fixed config formatTest plan
🤖 Generated with Claude Code