From c27989cf6982e7c315954070fb9de2e49afdc857 Mon Sep 17 00:00:00 2001 From: Kim Nylander Date: Fri, 20 Dec 2024 02:35:59 -0500 Subject: [PATCH 1/6] Add intro content from Pyroscope --- docs/sources/access/{index.md => _index.md} | 0 docs/sources/access/profile-settings.md | 54 +++++++++++ docs/sources/concepts/{index.md => _index.md} | 0 docs/sources/concepts/continuous-profiling.md | 20 ++++ docs/sources/concepts/flame-graphs.md | 15 +++ docs/sources/concepts/profile-types.md | 36 ++++++++ docs/sources/concepts/what-is-profiling.md | 16 ++++ .../investigate/{index.md => _index.md} | 0 docs/sources/investigate/flame-graph-ai.md | 91 +++++++++++++++++++ 9 files changed, 232 insertions(+) rename docs/sources/access/{index.md => _index.md} (100%) create mode 100644 docs/sources/access/profile-settings.md rename docs/sources/concepts/{index.md => _index.md} (100%) create mode 100644 docs/sources/concepts/continuous-profiling.md create mode 100644 docs/sources/concepts/flame-graphs.md create mode 100644 docs/sources/concepts/profile-types.md create mode 100644 docs/sources/concepts/what-is-profiling.md rename docs/sources/investigate/{index.md => _index.md} (100%) create mode 100644 docs/sources/investigate/flame-graph-ai.md diff --git a/docs/sources/access/index.md b/docs/sources/access/_index.md similarity index 100% rename from docs/sources/access/index.md rename to docs/sources/access/_index.md diff --git a/docs/sources/access/profile-settings.md b/docs/sources/access/profile-settings.md new file mode 100644 index 00000000..ca195d96 --- /dev/null +++ b/docs/sources/access/profile-settings.md @@ -0,0 +1,54 @@ +--- +description: Configure available settings for Explore Profiles. +keywords: + - pyroscope + - continuous profiling + - settings +menuTitle: Profile settings +title: Profile settings +weight: 800 +aliases: + - /docs/grafana-cloud/monitor-applications/profiles/profile-settings/ +--- + +# Profiles settings + +The **Profiles settings** page lets you modify flame graph, export, and function details options used for Profiles and [Explore Profiles](). + +![The Profiles Settings page](/media/docs/explore-profiles/explore-profiles-settings.png) + +| Features | Options | Explanation | +| --------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Collapsed flame graph** | Default: Off | When this feature is active, you can collapse flame graphs to minimize their screen space. | +| **Maximum number of nodes** | Default: 16384 | This number controls the maximum number of nodes, which controls the depth of the flame graph. The higher the number, the more nodes are used in the flame graph. The flame graphs appear longer. | +| **Enable flamegraph.com** | Default: On | Adds a `flamegraph.com` export option to the **Export flame graph** menu. Flame graphs uploaded to `flamegraph.com` have a publicly accessible URL. Deactivate this option if data privacy is a concern. | +| **Enable function details** | Default: On | Enables mapping of resource usage to lines of source code. If the [GitHub integration](https://grafana.com/docs/grafana-cloud/monitor-applications/profiles/pyroscope-github-integration/) is configured, then the source code is downloaded from GitHub. | + +## Before you begin + +You need to have administrator privileges in your Grafana instance to be view and modify the Explore Profiles settings. + +## Modify settings + +To change the settings for Profiles: + +1. Sign in to your Grafana instance using an account with administrator access. +1. Select **Explore** > **Profiles** in the left navigation. +1. Select the **Settings** (gear) icon in the right corner. + ![Access the Settings by selecting the gear icon](/media/docs/explore-profiles/explore-profiles-settings-icon.png) +1. Change any options as desired. +1. Select **Save settings** to preserve the changes. + + \ No newline at end of file diff --git a/docs/sources/concepts/index.md b/docs/sources/concepts/_index.md similarity index 100% rename from docs/sources/concepts/index.md rename to docs/sources/concepts/_index.md diff --git a/docs/sources/concepts/continuous-profiling.md b/docs/sources/concepts/continuous-profiling.md new file mode 100644 index 00000000..08b315d0 --- /dev/null +++ b/docs/sources/concepts/continuous-profiling.md @@ -0,0 +1,20 @@ +--- +title: What is continuous profiling? +menuTitle: Continuous profiling +description: Discover the benefits of continuous profiling and its role in modern application performance analysis. +weight: 200 +keywords: + - continuous profiling + - flame graphs +refs: + flame-graphs: + - pattern: /docs/pyroscope/ + destination: https://grafana.com/docs/explore-profiles//concepts/flame-graphs/ +--- + +# What is continuous profiling? + +[//]: # 'Shared content for the when to use continuous profiling.' +[//]: # 'This content is located in /pyroscope/docs/sources/shared/intro/continuous-profiling.md' + +{{< docs/shared source="pyroscope" lookup="intro/continuous-profiling.md" version="" >}} diff --git a/docs/sources/concepts/flame-graphs.md b/docs/sources/concepts/flame-graphs.md new file mode 100644 index 00000000..43e2b62e --- /dev/null +++ b/docs/sources/concepts/flame-graphs.md @@ -0,0 +1,15 @@ +--- +title: Flame graphs +menuTitle: Flame graphs +description: Learn about flame graphs to help visualize performance data. +weight: 33 +keywords: + - Flame graphs +--- + +# Flame graphs + +[//]: # 'Shared content for intro to flame graphs.' +[//]: # 'This content is located in /pyroscope/docs/sources/shared/intro/flame-graphs.md' + +{{< docs/shared source="pyroscope" lookup="intro/flame-graphs.md" version="" >}} \ No newline at end of file diff --git a/docs/sources/concepts/profile-types.md b/docs/sources/concepts/profile-types.md new file mode 100644 index 00000000..b7a214a7 --- /dev/null +++ b/docs/sources/concepts/profile-types.md @@ -0,0 +1,36 @@ +--- +title: Understand profiling types and their uses in Pyroscope +menuTitle: Understand profiling types +description: Learn about the different profiling types available in Pyroscope and how to effectively use them in your application performance analysis. +weight: 300 +keywords: + - profiles + - profiling types + - application performance + - flame graphs +--- + +# Understand profiling types and their uses in Pyroscope + +{{< docs/shared source="pyroscope" lookup="intro/continuous-profiling.md" version="" >}} + +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 + +In Pyroscope, profiling types refer to different dimensions of application performance analysis, focusing on specific aspects like CPU usage, memory allocation, or thread synchronization. + +[//]: # 'Shared content for available profile types' +[//]: # 'This content is located in /pyroscope/docs/sources/shared/available-profile-types.md' + +{{< docs/shared source="pyroscope" lookup="available-profile-types.md" version="latest" >}} + +Refer to the Profile types tables for information on supported profile types based on instrumentation method. + +For information on auto-instrumentation and supported language SDKs, refer to [Configure the client](https://grafana.com/docs/pyroscope//configure-client/). + + + +[//]: # 'Shared content for profile type explanations.' +[//]: # 'This content is located in /pyroscope/docs/sources/shared/intro/profile-types-descriptions.md' + diff --git a/docs/sources/concepts/what-is-profiling.md b/docs/sources/concepts/what-is-profiling.md new file mode 100644 index 00000000..95e24a5d --- /dev/null +++ b/docs/sources/concepts/what-is-profiling.md @@ -0,0 +1,16 @@ +--- +title: What is profiling? +menuTitle: What is profiling? +description: Discover the types of profiling and how to apply each profiling method. +weight: 33 +keywords: + - Pyroscope + - Profiling +--- + +# What is profiling? + +[//]: # 'Shared content for What is profiling?' +[//]: # 'This content is located in /pyroscope/docs/sources/shared/intro/what-is-profiling.md' + +{{< docs/shared source="pyroscope" lookup="intro/what-is-profiling.md" version="" >}} diff --git a/docs/sources/investigate/index.md b/docs/sources/investigate/_index.md similarity index 100% rename from docs/sources/investigate/index.md rename to docs/sources/investigate/_index.md diff --git a/docs/sources/investigate/flame-graph-ai.md b/docs/sources/investigate/flame-graph-ai.md new file mode 100644 index 00000000..1d98fa32 --- /dev/null +++ b/docs/sources/investigate/flame-graph-ai.md @@ -0,0 +1,91 @@ +--- +description: Use Flame graph AI to better understand your profile data and flame graphs. +keywords: + - continuous profiling + - flame graphs + - Flame graph AI +menuTitle: Use Flame graph AI +title: Use Flame graph AI +weight: 100 +refs: + flame-graph-panel: + - pattern: /docs/grafana/ + destination: /docs/grafana//panels-visualizations/visualizations/flame-graph/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/flame-graph/ +--- + +# Use 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](ref:flame-graph-panel). + +Flame graphs and profiling data in general can help you understand: + +1. Performance bottlenecks: What's causing the slowdown? +1. Root causes: Why is it happening? +1. Recommended fixes: How would you resolve it? + +Flame graph AI answers these questions when explaining your flame graph. +To learn more, refer to [AI-powered insights for continuous profiling: introducing Flame graph AI in Grafana Cloud](https://grafana.com/blog/2024/05/15/ai-powered-insights-for-continuous-profiling-introducing-flame-graph-ai-in-grafana-cloud/). + +![Flame graph analysis with performance bottleneck, root cause, and recommended fix](/media/docs/grafana-cloud/profiles/pyorsope-flamegraph-ai-analysis.png) + +## 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](https://pyroscope.io/blog/ai-powered-flamegraph-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** and the Explore Profiles app, nested underneath **Explore** > **Profiles** > **Explore profiles**. + +### Before you begin + +To use Flame graph AI, you must have: + +- Configured a [Grafana Pyroscope data source](https://grafana.com/docs/grafana-cloud/connect-externally-hosted/data-sources/pyroscope/) that has profiling data + +- Enabled the [LLM plugin](https://grafana.com/docs/grafana-cloud/alerting-and-irm/machine-learning/configure/llm-plugin/) for your Grafana instance +- Optional: Activated the [Explore Profiles](https://grafana.com/docs/grafana-cloud/visualizations/simplified-exploration/profiles/access/) app for your Grafana instance + +### Use Flame graph AI + +To use Flame graph AI when viewing a flame graph: + +1. Sign on to your Grafana Cloud account and start your Grafana instance. +1. Select **Explore** > **Profiles** from the left navigation. +1. Select **Flame graph** view from the **Exploration** types or select any view or service with an available flame graph. For example, from the **All services** view, select any **Flame graph** link to open the flame graph for that service. +1. Select **Explain Flame Graph** to view the **Flame graph analysis**. + +### Use Flame graph AI in Diff flame graph view + +The **Diff flame graph** 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 **Diff flame graphw** view is an extension of **Comparison view**, crucial for more easily visually showing the differences between two profiling datasets. +Similar to a `git diff`, the comparison 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: + +1. Sign on to your Grafana Cloud account and start your Grafana instance. +1. Select **Explore** > **Profiles** from the left navigation. +1. Select a **Service**, **Profile**, and time range (optional; default value is **Last 1 hour**). +1. Optional: In **Baseline time range**, select one or more labels to use as filters. Select **Execute**. +1. Optional: In **Comparison time range**, select one or more labels to use as filters. Select **Execute**. +1. Select **Explain Flame Graph**. From d3abdef692c4d9c90ad4906a26aa7a08c8a353f8 Mon Sep 17 00:00:00 2001 From: Kim Nylander Date: Fri, 20 Dec 2024 02:40:44 -0500 Subject: [PATCH 2/6] Fix page weights --- docs/sources/concepts/flame-graphs.md | 2 +- docs/sources/concepts/what-is-profiling.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/concepts/flame-graphs.md b/docs/sources/concepts/flame-graphs.md index 43e2b62e..cdf1784f 100644 --- a/docs/sources/concepts/flame-graphs.md +++ b/docs/sources/concepts/flame-graphs.md @@ -2,7 +2,7 @@ title: Flame graphs menuTitle: Flame graphs description: Learn about flame graphs to help visualize performance data. -weight: 33 +weight: 400 keywords: - Flame graphs --- diff --git a/docs/sources/concepts/what-is-profiling.md b/docs/sources/concepts/what-is-profiling.md index 95e24a5d..93b3c7cd 100644 --- a/docs/sources/concepts/what-is-profiling.md +++ b/docs/sources/concepts/what-is-profiling.md @@ -2,7 +2,7 @@ title: What is profiling? menuTitle: What is profiling? description: Discover the types of profiling and how to apply each profiling method. -weight: 33 +weight: 100 keywords: - Pyroscope - Profiling From c821a6b4cfa44b8d775021673857df8ffa4c8a0f Mon Sep 17 00:00:00 2001 From: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:48:43 -0500 Subject: [PATCH 3/6] Apply suggestions from code review --- docs/sources/concepts/continuous-profiling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/concepts/continuous-profiling.md b/docs/sources/concepts/continuous-profiling.md index 08b315d0..c22f3837 100644 --- a/docs/sources/concepts/continuous-profiling.md +++ b/docs/sources/concepts/continuous-profiling.md @@ -8,7 +8,7 @@ keywords: - flame graphs refs: flame-graphs: - - pattern: /docs/pyroscope/ + - pattern: /docs/explore-profiles/ destination: https://grafana.com/docs/explore-profiles//concepts/flame-graphs/ --- From e265c4cc74db4557f7adeab1734c29136463e524 Mon Sep 17 00:00:00 2001 From: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> Date: Mon, 6 Jan 2025 13:46:04 -0500 Subject: [PATCH 4/6] Apply suggestions from code review --- docs/sources/access/profile-settings.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/sources/access/profile-settings.md b/docs/sources/access/profile-settings.md index ca195d96..a27a85f0 100644 --- a/docs/sources/access/profile-settings.md +++ b/docs/sources/access/profile-settings.md @@ -21,18 +21,17 @@ The **Profiles settings** page lets you modify flame graph, export, and function | --------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Collapsed flame graph** | Default: Off | When this feature is active, you can collapse flame graphs to minimize their screen space. | | **Maximum number of nodes** | Default: 16384 | This number controls the maximum number of nodes, which controls the depth of the flame graph. The higher the number, the more nodes are used in the flame graph. The flame graphs appear longer. | + | **Enable function details** | Default: On | Enables mapping of resource usage to lines of source code. If the [GitHub integration](https://grafana.com/docs/grafana-cloud/monitor-applications/profiles/pyroscope-github-integration/) is configured, then the source code is downloaded from GitHub. | -## Before you begin - -You need to have administrator privileges in your Grafana instance to be view and modify the Explore Profiles settings. ## Modify settings -To change the settings for Profiles: +To change the settings for Explore Profiles: -1. Sign in to your Grafana instance using an account with administrator access. +1. Sign in to your Grafana instance. 1. Select **Explore** > **Profiles** in the left navigation. 1. Select the **Settings** (gear) icon in the right corner. ![Access the Settings by selecting the gear icon](/media/docs/explore-profiles/explore-profiles-settings-icon.png) From 602c5a65b595b3831a88fba5bacd17c1721bf675 Mon Sep 17 00:00:00 2001 From: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:38:00 -0500 Subject: [PATCH 5/6] Apply suggestions from code review Co-authored-by: Bryan Huhta <32787160+bryanhuhta@users.noreply.github.com> --- docs/sources/investigate/flame-graph-ai.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sources/investigate/flame-graph-ai.md b/docs/sources/investigate/flame-graph-ai.md index 1d98fa32..ba47d83a 100644 --- a/docs/sources/investigate/flame-graph-ai.md +++ b/docs/sources/investigate/flame-graph-ai.md @@ -36,7 +36,7 @@ To learn more, refer to [AI-powered insights for continuous profiling: introduci ## 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. +Flame graph AI analyzes a flame graph and provides a plain English interpretation of the flame graph. 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. @@ -61,7 +61,7 @@ To use Flame graph AI, you must have: - Configured a [Grafana Pyroscope data source](https://grafana.com/docs/grafana-cloud/connect-externally-hosted/data-sources/pyroscope/) that has profiling data - Enabled the [LLM plugin](https://grafana.com/docs/grafana-cloud/alerting-and-irm/machine-learning/configure/llm-plugin/) for your Grafana instance -- Optional: Activated the [Explore Profiles](https://grafana.com/docs/grafana-cloud/visualizations/simplified-exploration/profiles/access/) app for your Grafana instance +- Activated the [Explore Profiles](https://grafana.com/docs/grafana-cloud/visualizations/simplified-exploration/profiles/access/) app for your Grafana instance ### Use Flame graph AI @@ -76,7 +76,7 @@ To use Flame graph AI when viewing a flame graph: The **Diff flame graph** 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 **Diff flame graphw** view is an extension of **Comparison view**, crucial for more easily visually showing the differences between two profiling datasets. +The **Diff flame graph** view is an extension of **Comparison view**, crucial for more easily visually showing the differences between two profiling datasets. Similar to a `git diff`, the comparison 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. From c03c3297afa465144fd1db5985c79ca56ba3a807 Mon Sep 17 00:00:00 2001 From: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:12:48 -0500 Subject: [PATCH 6/6] Update docs/sources/investigate/flame-graph-ai.md --- docs/sources/investigate/flame-graph-ai.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/sources/investigate/flame-graph-ai.md b/docs/sources/investigate/flame-graph-ai.md index ba47d83a..ea776e6c 100644 --- a/docs/sources/investigate/flame-graph-ai.md +++ b/docs/sources/investigate/flame-graph-ai.md @@ -56,6 +56,8 @@ You can use Flame graph AI in Grafana **Explore** > **Profiles** and the Explore ### Before you begin +Flame graph AI is available only when using Explore Profiles. + To use Flame graph AI, you must have: - Configured a [Grafana Pyroscope data source](https://grafana.com/docs/grafana-cloud/connect-externally-hosted/data-sources/pyroscope/) that has profiling data