⚠️ PROOF OF CONCEPT⚠️ This project is a proof-of-concept demonstration only and is NOT intended for production use.
- No security hardening has been applied
- No performance optimizations for production workloads
- Configuration may contain insecure defaults
- Limited error handling and monitoring
- Not tested at scale
Use this code for learning, experimentation, and as a starting point only.
Example: Grafana Pyroscope interface showing continuous profiling data from the sample Go application, including memory usage patterns and flame graph visualization.
This project demonstrates profiling integration with OpenTelemetry and Grafana Pyroscope on Kubernetes using pprof. It uses Alloy to scrape from pprof.
There is an attempt to expose profiling data same data as OTEL metrics (disabled, not functional).
This does NOT the proposed OTEL support for profiling; however, this would be a viable alternative at some point.
- Run the setup script to create the Kind cluster:
./setup.sh
- (Optional) Test your setup:
./test.sh
- Start the development environment:
tilt up
-
Access Grafana at http://localhost:3000 (admin/admin)
-
When finished, clean up resources:
./teardown.sh
The environment includes:
- Kind cluster
- Grafana LGTM stack (Loki, Grafana, Tempo, Mimir, Pyroscope)
- Grafana Alloy for scraping pprof endpoints
- Sample Go application with pprof and otel-profiling-go integration
- Sample App: Go application with pprof endpoints and otel-profiling-go for trace correlation
- Grafana Alloy: Scrapes pprof endpoints and forwards to Pyroscope
- Grafana LGTM: Stores and visualizes profiles, logs, metrics, and traces
- Pyroscope: Integrated in LGTM for continuous profiling
- Continuous profiling with pprof (CPU, heap, goroutines)
- Trace-to-profile correlation using otel-profiling-go
- Grafana dashboards for profile visualization
- OpenTelemetry integration for distributed tracing