Flame graph AI
Flame graph AI helps you understand your profiling data by using a large-language model (LLM) to assist with data interpretation.
A flame graph provides a convenient way to visualize performance data. These graphs provide a clear, intuitive understanding of resource allocation and bottlenecks within an application. To learn more, refer to Flame graph visualizations.
Flame graphs and profiling data in general can help you understand:
- Performance bottlenecks: What’s causing the slowdown?
- Root causes: Why is it happening?
- Recommended fixes: How would you resolve it?
Flame graph AI answers these questions when explaining your flame graph.
Flame graph AI compliments human interpretation
Flame graph AI’s strength lies not just in analysis but more importantly in filling the gaps by augmenting and enhancing user experience.
It only takes using a flame graph successfully once to really move from the beginner to advanced interpretation. From a product standpoint, one challenge has been building a user-experience that can span from beginner to expert and still be useful for both.
When compared to volunteers in a limited flame graph interpretation test, the Flame graph AI’s interpreter scored 100%. Beginners scored 25% and flame graph experts scored 83%. The AI consistently outperformed beginners and advanced users, providing accurate, albeit less detailed/nuanced, interpretations than the experts.
These initial results at least point towards a great opportunity in adding value to most users by incorporating AI.
Refer to the AI-powered flame graph interpreter blog post to learn more.
Explore your profile data with Flame graph AI
Flame graph AI uses the LLM plugin for Grafana to provide the large-language model using OpenAI API.
You can use Flame graph AI in Grafana Explore > Profiles for Single view and Comparison diff view.
Before you begin
To use Flame graph AI, you must have:
Configured a Grafana Pyroscope data source that has profiling data
Enabled the LLM plugin for your Grafana instance
Use Flame graph AI in Single view
To use Flame graph AI when viewing a single flame graph:
- Sign on to your Grafana Cloud account and start your Grafana instance.
- Select Explore > Profiles from the left navigation.
- Select Single view from the list of profile views.
- Select a Service from the drop-down and a Profile. In this case,
pyroscope-rideshare-go
service andcpu(process_cpu)
are selected. - Select Explain Flamegraph to view the AI Flamegraph Analysis.
Use Flame graph AI in Comparison diff view
The Comparison view facilitates side-by-side comparison of profiles either based on different label sets, different time periods, or both. This feature is extremely valuable for understanding the impact of changes or differences between do distinct queries of your application.
The Comparison diff view is an extension of Comparison view, crucial for more easily visually showing the differences between two profiling data sets.
Similar to a git diff
, the Comparison diff view takes the flame graphs from the comparison view and highlights the differences between the two flame graphs.
You can use Flame graph AI to interpret the diff view.
To use Flame graph AI when comparing two different flame graphs:
- Sign on to your Grafana Cloud account and start your Grafana instance.
- Select Explore > Profiles from the left navigation.
- Select Comparison diff view from the list of profile views.
- Select a Service, Profile, and time range (optional; default value is Last 1 hour).
- Optional: In Baseline time range, select one or more labels to use as filters. Select Execute.
- Optional: In Comparison time range, select one or more labels to use as filters. Select Execute.
- Select Explain FlameGraph.
Was this page helpful?
Related resources from Grafana Labs
![Getting started with the Grafana LGTM Stack](/static/assets/featured/getting-started-with-grafana-lgtm-stack-amer_featured.png?w=200 200w, /static/assets/featured/getting-started-with-grafana-lgtm-stack-amer_featured.png?w=400 400w)
![Intro to Kubernetes monitoring in Grafana Cloud](/media/webinar/Screenshot-2024-02-12-at-4.09.30-PM.png?w=200 200w, /media/webinar/Screenshot-2024-02-12-at-4.09.30-PM.png?w=400 400w)
![Building advanced Grafana dashboards](/media/webinar/AMER_buildadv_notxt.png?w=200 200w, /media/webinar/AMER_buildadv_notxt.png?w=400 400w)