Menu
Grafana Cloud
Beyla profiling
To profile a Beyla instrumented application do the following:
Run the auto-instrumentation tool with the
PROFILE_PORT
variable set, e.g. 6060.Download the required profiles:
shcurl -o <profile> http://localhost:6060/debug/pprof/<profile>
Where
<profile>
can be:allocs
: a sample of all past memory allocationsblock
: stack traces that led to blocking on synchronization primitivescmdline
: the command to run the program to profilegoroutine
: stack traces of all current goroutinesheap
: a sample of memory allocations of live objects- provide an optional
gc
query parameter to run the GC before sampling the heap
- provide an optional
mutex
: stack traces of holders of contended mutexesprofile
: CPU profile- provide an optional
duration
query parameter in seconds
- provide an optional
threadcreate
: stack traces that led to the creation of new OS threadstrace
: a trace of execution of the current program- provide an optional
duration
query parameter in seconds
- provide an optional
Example:
shcurl "http://localhost:6060/debug/pprof/trace?seconds=20" -o trace20s curl "http://localhost:6060/debug/pprof/profile?duration=20" -o profile20s curl "http://localhost:6060/debug/pprof/heap?gc" -o heap curl "http://localhost:6060/debug/pprof/allocs" -o allocs curl "http://localhost:6060/debug/pprof/goroutine" -o goroutine
Use
go tool pprof
to dig into the profiles (go tool trace
fortrace
profiles)
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:

Getting started with your metrics, logs, and traces in Grafana Cloud
Learn to use the best open source observability software (Grafana, Prometheus, Loki, and Tempo) without the overhead of managing and scaling your own stack.

Kubernetes monitoring, out-of-the-box with Grafana Cloud
In this webinar you’ll learn how Grafana offers developers and SREs a simple and quick-to-value solution for monitoring their Kubernetes infrastructure.

Unify your data with Grafana plugins: Datadog, Splunk, MongoDB, and more
In this webinar, learn how to leverage Grafana's plugin ecosystem for access to 80+ data sources, including plugins for Datadog, Splunk, MongoDB, and more.