Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Open source

Profile types and instrumentation

Profiling is an essential tool for understanding and optimizing application performance. In Pyroscope, various profiling types allow for an in-depth analysis of different aspects of your application. This guide explores these types and explain their impact on your program.

Profiling types refer to different dimensions of application performance analysis, focusing on specific aspects like CPU usage, memory allocation, or thread synchronization.

Pyroscope supports these profile types:

  • CPU (CPU time, wall time)
  • Memory (allocation objects, allocation space, heap)
  • In use objects and in-use space
  • Goroutines
  • Mutex count and duration
  • Block count and duration
  • Lock count and duration
  • Exceptions

Refer to Understand profiling types and their uses in Pyroscope for more details about the profile types.

Profile type support by instrumentation method

The instrumentation method you use determines which profile types are available. You can use either auto or manual instrumentation.

Auto-instrumentation with Grafana Alloy

You can send data from your application using Grafana Alloy collector. Alloy supports profiling with eBPF, Java, and Golang in pull mode.

For more information, refer to Configure the client to send profiles with Grafana Alloy.

This table lists the available profile types based on auto instrumentation using Alloy.

Profile typeGo (pull)JavaeBPF
CPUYesYesYes
Alloc ObjectsYesYes
Alloc SpaceYesYes
Inuse Objects
Inuse Space
GoroutinesYes
Mutex Count
Mutex Duration
Block CountYes
Block DurationYes
Lock CountYes
Lock DurationYes
Exceptions
Wall
Heap

Instrumentation with SDKs

Using the Pyroscope language SDKs lets you instrument your application directly for precise profiling. You can customize the profiling process according to your application’s specific requirements.

For more information on the language SDKs, refer to Pyroscope language SDKs.

This table lists the available profile types based on the language SDK.

Profile typeGo (push)Java.NETRubyPythonRustNode.js
CPUYesYesYesYesYesYesYes
Alloc ObjectsYesYesYes
Alloc SpaceYesYesYes
Inuse ObjectsYesYes (7.0+)
Inuse SpaceYesYes (7.0+)
GoroutinesYes
Mutex CountYesYes
Mutex DurationYesYes
Block CountYes
Block DurationYes
Lock CountYesYes
Lock DurationYesYes
ExceptionsYes
WallYesYes
HeapYes (7.0+)Yes

Profile types supported with span profiles

Pyroscope can integrate with distributed tracing systems supporting the OpenTelemetry standard. This integration lets you link traces with the profiling data and find resource usage for specific lines of code for your trace spans.

Only CPU profile type is supported for span profiles.

The following languages are supported: