We should add information such as file names/path and line numbers into the flamegraph. Ideally, we should also add information about the application version.
Grafana Pyroscope allows users to visualize a profile in various forms, with the most common one being a so-called Flamegraph (Icicle plot, to be precise). In a nutshell, a Flamegraph is a directed acyclic graph, where each node refers to a specific spot in the profiled code. The graph itself (the hierarchy of the nodes) is formed by stack traces. Other representations, such as sandwich view and call graph visualize relationships of the nodes.
Pyroscope backend exposes two API endpoints for profiling data retrieval:
SelectMergeStacktraces that returns a flamegraph in the flamebearer format. The method is used by frontend. Nodes of the flamegraph refer to call sites.
SelectMergeProfile that returns a profile in the pprof format (gzip protobuf encoded binary file). The method is used by profilecli tool for exporting profiling data, and by pprof exporter available in the UI.
Flamegraph returned by backend does not include information about the exact locations of nodes in code, therefore It is not possible to identify the exact line in the function body where the stack trace samples have been collected. For example, it is not possible to get information about where exactly CPU time has been spent functions deconstructMemoryProfile and parquet-go.Value.Level from this flamegraph:
The only way to get this information is to use profilecli tool and visualize pprof file with 3rd party tools.
We should add information such as file names/path and line numbers into the flamegraph. Ideally, we should also add information about the application version.
Grafana Pyroscope allows users to visualize a profile in various forms, with the most common one being a so-called Flamegraph (Icicle plot, to be precise). In a nutshell, a Flamegraph is a directed acyclic graph, where each node refers to a specific spot in the profiled code. The graph itself (the hierarchy of the nodes) is formed by stack traces. Other representations, such as sandwich view and call graph visualize relationships of the nodes.
Pyroscope backend exposes two API endpoints for profiling data retrieval:
Flamegraph returned by backend does not include information about the exact locations of nodes in code, therefore It is not possible to identify the exact line in the function body where the stack trace samples have been collected. For example, it is not possible to get information about where exactly CPU time has been spent functions
deconstructMemoryProfile
andparquet-go.Value.Level
from this flamegraph:The only way to get this information is to use profilecli tool and visualize pprof file with 3rd party tools.