<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Introduction on Grafana Labs</title><link>https://grafana.com/docs/pyroscope/v1.18.x/introduction/</link><description>Recent content in Introduction on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/pyroscope/v1.18.x/introduction/index.xml" rel="self" type="application/rss+xml"/><item><title>What is profiling?</title><link>https://grafana.com/docs/pyroscope/v1.18.x/introduction/what-is-profiling/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/introduction/what-is-profiling/</guid><content><![CDATA[&lt;h1 id=&#34;what-is-profiling&#34;&gt;What is profiling?&lt;/h1&gt;


&lt;div data-shared=&#34;intro/what-is-profiling.md&#34;&gt;
            &lt;!--  What is profiling? --&gt;
&lt;p&gt;Profiling is a technique used in software development to measure and analyze the runtime behavior of a program.
By profiling a program, developers can identify which parts of the program consume the most resources, such as CPU time, memory, or I/O operations.
You can use this information to optimize the program, making it run faster or use fewer resources.&lt;/p&gt;
&lt;p&gt;Pyroscope can be used for both traditional and continuous profiling.&lt;/p&gt;
&lt;h2 id=&#34;traditional-profiling-non-continuous&#34;&gt;Traditional profiling (non-continuous)&lt;/h2&gt;
&lt;p&gt;Traditional profiling, often referred to as &lt;strong&gt;sample-based&lt;/strong&gt; or &lt;strong&gt;instrumentation-based&lt;/strong&gt; profiling, has its roots in the early days of computing.
Back then, the primary challenge was understanding how a program utilized the limited computational resources available.&lt;/p&gt;
&lt;p&gt;With sample-based profiling, the profiler interrupts the program at regular intervals, capturing the program&amp;rsquo;s state each time.
By analyzing these snapshots, developers can deduce the frequency at which parts of the code execute.&lt;/p&gt;
&lt;p&gt;With instrumentation-based profiling, developers insert additional code into the program that records information about its execution.
This approach provides detailed insights but can alter the program&amp;rsquo;s behavior due to the added code overhead.&lt;/p&gt;
&lt;h3 id=&#34;benefits&#34;&gt;Benefits&lt;/h3&gt;
&lt;p&gt;Traditional profiling provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Precision&lt;/strong&gt;: Offers a deep dive into specific sections of the code.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control&lt;/strong&gt;: Developers can initiate profiling sessions at their discretion, allowing for targeted optimization efforts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Detailed reports&lt;/strong&gt;: Provides granular data about program execution, making it easier to pinpoint bottlenecks.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;continuous-profiling&#34;&gt;Continuous profiling&lt;/h2&gt;
&lt;p&gt;As software systems grew in complexity and scale, the limitations of traditional profiling became evident.
Issues could arise in production that weren&amp;rsquo;t apparent during limited profiling sessions in the development or staging environments.&lt;/p&gt;
&lt;p&gt;This led to the development of continuous profiling, a method where the profiling data is continuously collected in the background with minimal overhead.
By doing so, developers gain a more comprehensive view of a program&amp;rsquo;s behavior over time, helping to identify sporadic or long-term performance issues.&lt;/p&gt;
&lt;h3 id=&#34;benefits-1&#34;&gt;Benefits&lt;/h3&gt;
&lt;p&gt;Continuous profiling provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Consistent monitoring&lt;/strong&gt;: Unlike traditional methods that offer snapshots, continuous profiling maintains an uninterrupted view, exposing both immediate and long-term performance issues.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Proactive bottleneck detection&lt;/strong&gt;: By consistently capturing data, performance bottlenecks are identified and addressed before they escalate, reducing system downtime and ensuring smoother operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Broad performance landscape&lt;/strong&gt;: Provides insights across various platforms, from varied technology stacks to different operating systems, ensuring comprehensive coverage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bridging the Dev-Prod gap&lt;/strong&gt;: Continuous profiling excels in highlighting differences between development and production:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hardware discrepancies&lt;/strong&gt;: Unearths issues stemming from differences in machine specifications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Software inconsistencies&lt;/strong&gt;: Sheds light on variations in software components that might affect performance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Real-world workload challenges&lt;/strong&gt;: Highlights potential pitfalls when real user interactions and loads don&amp;rsquo;t align with development simulations.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Economical advantages&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Resource optimization&lt;/strong&gt;: Continual monitoring ensures resources aren&amp;rsquo;t wasted, leading to cost savings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rapid problem resolution&lt;/strong&gt;: Faster troubleshooting means reduced time and monetary investment in issue rectification, letting developers channel their efforts into productive endeavors.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Non-intrusive operation&lt;/strong&gt;: Specifically designed to work quietly in the background, continuous profiling doesn&amp;rsquo;t compromise the performance of live environments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Real-time response&lt;/strong&gt;: It equips teams with the ability to act instantly, addressing issues as they arise rather than post-occurrence, which is crucial for maintaining high system availability.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;choose-between-traditional-and-continuous-profiling&#34;&gt;Choose between traditional and continuous profiling&lt;/h2&gt;
&lt;p&gt;In many modern development workflows, both methods are useful.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Traditional profiling&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Continuous profiling&lt;/strong&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;When to use&lt;/td&gt;
              &lt;td&gt;During development or testing phases&lt;/td&gt;
              &lt;td&gt;In production environments or during extended performance tests.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Advantages&lt;/td&gt;
              &lt;td&gt;Offers detailed insights that can target specific parts of code.&lt;/td&gt;
              &lt;td&gt;Provides a continuous view of system performance, often with minimal overhead, making it suitable for live environments.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Disadvantages&lt;/td&gt;
              &lt;td&gt;Higher overhead provides only a snapshot in time.&lt;/td&gt;
              &lt;td&gt;It might be less detailed than traditional profiling due to the need to minimize impact on the running system.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;/div&gt;

        
]]></content><description>&lt;h1 id="what-is-profiling">What is profiling?&lt;/h1>
&lt;div data-shared="intro/what-is-profiling.md">
&lt;!-- What is profiling? -->
&lt;p>Profiling is a technique used in software development to measure and analyze the runtime behavior of a program.
By profiling a program, developers can identify which parts of the program consume the most resources, such as CPU time, memory, or I/O operations.
You can use this information to optimize the program, making it run faster or use fewer resources.&lt;/p></description></item><item><title>What is continuous profiling?</title><link>https://grafana.com/docs/pyroscope/v1.18.x/introduction/continuous-profiling/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/introduction/continuous-profiling/</guid><content><![CDATA[&lt;h1 id=&#34;what-is-continuous-profiling&#34;&gt;What is continuous profiling?&lt;/h1&gt;


&lt;div data-shared=&#34;intro/continuous-profiling.md&#34;&gt;
            &lt;!--  When to use continuous profiling --&gt;
&lt;p&gt;Continuous profiling is a systematic method of collecting and analyzing performance data from production systems.&lt;/p&gt;
&lt;p&gt;Traditionally, profiling is used to debug applications on an as-needed basis.
For example, you can run a benchmark tool locally and get a &lt;code&gt;pprof&lt;/code&gt; file in Go or connect to a misbehaving prod instance and pull a flame graph from a &lt;code&gt;JFR&lt;/code&gt; file in Java.
This method is good for debugging, but not robust enough for production.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-ui-single-2023-11-30.png&#34;
  alt=&#34;example flame graph&#34; width=&#34;1599&#34;
     height=&#34;836&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Refer to 

&lt;a href=&#34;/404/&#34;&gt;Flame graphs&lt;/a&gt; to learn more.&lt;/p&gt;
&lt;p&gt;Continuous profiling is a modern approach which is safer and more scalable for production environments.
It uses low-overhead sampling to collect profiles from production systems and stores the profiles in a database for later analysis.
Using continuous profiling gives you a more holistic view of your application and how it behaves in production.&lt;/p&gt;
&lt;p&gt;Grafana offers Grafana Pyroscope and Grafana Cloud Profiles (powered by Pyroscope) to collect and store your profiling data.
You can use Grafana Profiles Drilldown to inspect profile data and investigate issues.&lt;/p&gt;
&lt;h2 id=&#34;benefits&#34;&gt;Benefits&lt;/h2&gt;
&lt;p&gt;Why prioritize continuous profiling?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;In-depth code insights:&lt;/strong&gt; It provides granular, line-level insights into how application code utilizes resources, offering the most detailed view of application performance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Complements other observability tools:&lt;/strong&gt; Continuous profiling fills critical gaps left by metrics, logs, and tracing, creating a more comprehensive observability strategy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Proactive performance optimization:&lt;/strong&gt; Regular profiling enables teams to proactively identify and resolve performance bottlenecks, leading to more efficient and reliable applications.
&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/profiling-use-cases-diagram.png&#34;
  alt=&#34;Diagram showing 3 benefits of continuous profiling&#34; width=&#34;2186&#34;
     height=&#34;1224&#34;/&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;use-cases&#34;&gt;Use cases&lt;/h2&gt;
&lt;p&gt;Adopting continuous profiling with tools like Grafana Pyroscope and Profiles Drilldown can lead to significant business advantages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Reduced operational costs:&lt;/strong&gt; Optimization of resource usage can significantly cut down cloud and infrastructure expenses&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reduced latency:&lt;/strong&gt; Identifying and addressing performance bottlenecks leads to faster and more efficient applications&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhanced incident management:&lt;/strong&gt; Faster problem identification and resolution, reducing Mean Time to Resolution (MTTR) and improving end-user experience&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/cost-cutting-diagram.png&#34;
  alt=&#34;Infographic illustrating key business benefits&#34; width=&#34;2196&#34;
     height=&#34;1234&#34;/&gt;&lt;/p&gt;
&lt;h3 id=&#34;reduced-operational-costs&#34;&gt;Reduced operational costs&lt;/h3&gt;
&lt;p&gt;By providing in-depth insights into application performance, profiling empowers teams to identify and eliminate inefficiencies, leading to significant savings in areas like observability, incident management, messaging/queuing, deployment tools, and infrastructure.&lt;/p&gt;
&lt;!-- vale Grafana.Spelling = NO --&gt;
&lt;p&gt;By using sampling profilers, Pyroscope and Cloud Profiles can collect data with minimal overhead (~2-5% depending on a few factors).
The 
    &lt;a href=&#34;/docs/pyroscope/v1.18.x/reference-pyroscope-architecture/about-grafana-pyroscope-architecture/&#34;&gt;custom storage engine&lt;/a&gt; compresses and stores the data efficiently.
Some advantages of this are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Low CPU overhead thanks to sampling profiler technology&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- vale Grafana.Spelling = YES --&gt;
&lt;ul&gt;
&lt;li&gt;Control over profiling data granularity (10s to multiple years)&lt;/li&gt;
&lt;li&gt;Efficient compression, low disk space requirements and cost&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;reduced-latency&#34;&gt;Reduced latency&lt;/h3&gt;
&lt;p&gt;Profiles play a pivotal role in reducing application latency by identifying performance bottlenecks at the code level.
This granular insight allows for targeted optimization, leading to faster application response times, improved user experience, and consequently, better business outcomes like increased customer satisfaction and revenue.&lt;/p&gt;
&lt;h3 id=&#34;enhanced-incident-management&#34;&gt;Enhanced incident management&lt;/h3&gt;
&lt;p&gt;Pyroscope and Profiles Drilldown streamline incident management by offering immediate, actionable insights into application performance issues.
With continuous profiling, teams can quickly pinpoint the root cause of an incident, reducing the mean time to resolution (MTTR) and enhancing overall system reliability and user satisfaction.&lt;/p&gt;
&lt;/div&gt;

        
]]></content><description>&lt;h1 id="what-is-continuous-profiling">What is continuous profiling?&lt;/h1>
&lt;div data-shared="intro/continuous-profiling.md">
&lt;!-- When to use continuous profiling -->
&lt;p>Continuous profiling is a systematic method of collecting and analyzing performance data from production systems.&lt;/p></description></item><item><title>Profiling types and their uses</title><link>https://grafana.com/docs/pyroscope/v1.18.x/introduction/profiling-types/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/introduction/profiling-types/</guid><content><![CDATA[&lt;h1 id=&#34;profiling-types-and-their-uses&#34;&gt;Profiling types and their uses&lt;/h1&gt;
&lt;p&gt;Profiling is an essential tool for understanding and optimizing application performance.
In Grafana Pyroscope, various profiling types allow for an in-depth analysis of different aspects of your application.&lt;/p&gt;
&lt;h2 id=&#34;profiling-types&#34;&gt;Profiling types&lt;/h2&gt;
&lt;p&gt;Profiling types refer to different dimensions of application performance analysis, focusing on specific aspects like CPU usage, memory allocation, or thread synchronization.&lt;/p&gt;


&lt;div data-shared=&#34;available-profile-types.md&#34;&gt;
            &lt;p&gt;Pyroscope supports these profile types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CPU (CPU time, wall time)&lt;/li&gt;
&lt;li&gt;Memory (allocation objects, allocation space, heap)&lt;/li&gt;
&lt;li&gt;In use objects and in-use space&lt;/li&gt;
&lt;li&gt;Goroutines&lt;/li&gt;
&lt;li&gt;Mutex count and duration&lt;/li&gt;
&lt;li&gt;Block count and duration&lt;/li&gt;
&lt;li&gt;Lock count and duration&lt;/li&gt;
&lt;li&gt;Exceptions&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
&lt;p&gt;Refer to the 
    &lt;a href=&#34;/docs/pyroscope/v1.18.x/configure-client/profile-types/&#34;&gt;Profile types tables&lt;/a&gt; for information on supported profile types based on instrumentation method.&lt;/p&gt;
&lt;p&gt;For information on auto-instrumentation and supported language SDKs, refer to 
    &lt;a href=&#34;/docs/pyroscope/v1.18.x/configure-client/&#34;&gt;Configure the client&lt;/a&gt;.&lt;/p&gt;
&lt;!-- Description of profiling types --&gt;


&lt;div data-shared=&#34;intro/profile-types-descriptions.md&#34;&gt;
            &lt;!-- Profile type descriptions --&gt;
&lt;h2 id=&#34;cpu-profiling&#34;&gt;CPU profiling&lt;/h2&gt;
&lt;p&gt;CPU profiling measures the amount of CPU time consumed by different parts of your application code.
High CPU usage can indicate inefficient code, leading to poor performance and increased operational costs.
It&amp;rsquo;s used to identify and optimize CPU-intensive functions in your application.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: To identify and optimize CPU-intensive functions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flame graph insight&lt;/strong&gt;: The width of blocks indicates the CPU time consumed by each function&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The UI shows a spike in CPU along with the flame graph associated with that spike.
You may get similar insights from metrics, however, with profiling, you have more details into the specific cause of a spike in CPU usage at the line level.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-ui-single-2023-11-30.png&#34;
  alt=&#34;Example flame graph&#34; width=&#34;1599&#34;
     height=&#34;836&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;memory-allocation-profiling&#34;&gt;Memory allocation profiling&lt;/h2&gt;
&lt;p&gt;Memory allocation profiling tracks the amount and frequency of memory allocations by the application.
Excessive or inefficient memory allocation can lead to memory leaks and high garbage collection overhead, impacting application efficiency.&lt;/p&gt;
&lt;!-- vale Grafana.Spelling = NO --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Types&lt;/strong&gt;: Alloc Objects, Alloc Space&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- vale Grafana.Spelling = YES --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: For identifying and optimizing memory usage patterns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flame graph insight&lt;/strong&gt;: Highlights functions where memory allocation is high&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The timeline shows memory allocations over time and is great for debugging memory related issues.
A common example is when a memory leak is created due to improper handling of memory in a function.
This can be identified by looking at the timeline and seeing a gradual increase in memory allocations that never goes down.
This is a clear indicator of a memory leak.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-memory-leak-2023-11-30.png&#34;
  alt=&#34;memory leak example&#34; width=&#34;1109&#34;
     height=&#34;652&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Without profiling, this may be something that&amp;rsquo;s exhibited in metrics or out-of-memory errors (OOM) logs but with profiling you have more details into the specific function that&amp;rsquo;s allocating the memory which is causing the leak at the line level.&lt;/p&gt;
&lt;h2 id=&#34;goroutine-profiling&#34;&gt;Goroutine profiling&lt;/h2&gt;
&lt;p&gt;Goroutines are lightweight threads in Go, used for concurrent operations.
Goroutine profiling measures the usage and performance of these threads.
Poor management can lead to issues like deadlocks and excessive resource usage.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: Especially useful in Go applications for concurrency management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flame graph insight&lt;/strong&gt;: Provides a view of goroutine distribution and issues&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;mutex-profiling&#34;&gt;Mutex profiling&lt;/h2&gt;
&lt;p&gt;Mutex profiling involves analyzing mutex (mutual exclusion) locks, used to prevent simultaneous access to shared resources.
Excessive or long-duration mutex locks can cause delays and reduced application throughput.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Types&lt;/strong&gt;: Mutex Count, Mutex Duration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: To optimize thread synchronization and reduce lock contention&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flame graph insight&lt;/strong&gt;: Shows frequency and duration of mutex operations&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;block-profiling&#34;&gt;Block profiling&lt;/h2&gt;
&lt;p&gt;Block profiling measures the frequency and duration of blocking operations, where a thread is paused or delayed.
Blocking can significantly slow down application processes, leading to performance bottlenecks.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Types&lt;/strong&gt;: Block Count, Block Duration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: To identify and reduce blocking delays&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flame graph insight&lt;/strong&gt;: Identifies where and how long threads are blocked&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

        
]]></content><description>&lt;h1 id="profiling-types-and-their-uses">Profiling types and their uses&lt;/h1>
&lt;p>Profiling is an essential tool for understanding and optimizing application performance.
In Grafana Pyroscope, various profiling types allow for an in-depth analysis of different aspects of your application.&lt;/p></description></item><item><title>Flame graphs</title><link>https://grafana.com/docs/pyroscope/v1.18.x/introduction/flamegraphs/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/introduction/flamegraphs/</guid><content><![CDATA[&lt;h1 id=&#34;flame-graphs&#34;&gt;Flame graphs&lt;/h1&gt;


&lt;div data-shared=&#34;intro/flame-graphs.md&#34;&gt;
            &lt;!-- Flame graphs: Visualizing performance data --&gt;
&lt;p&gt;Flame graphs provide a visual summary of your profile data.
A flame graph is a complete visualization of hierarchical data, for example stack trace and, file system contents, with a metric, typically resource usage, attached to the data.&lt;/p&gt;
&lt;p&gt;A fundamental aspect of continuous profiling is the flame graph, a convenient way to visualize performance data.
These graphs provide a clear, intuitive understanding of resource allocation and bottlenecks within the application.&lt;/p&gt;
&lt;!-- vale Grafana.Spelling = NO --&gt;
&lt;p&gt;&lt;a href=&#34;https://www.brendangregg.com/flamegraphs.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Brendan Gregg&lt;/a&gt;, the creator of flame graphs, was inspired by the inability to view, read, and understand stack traces using the regular profilers to debug performance issues.&lt;/p&gt;
&lt;!-- vale Grafana.Spelling = YES --&gt;
&lt;h2 id=&#34;how-pyroscope-creates-flame-graphs&#34;&gt;How Pyroscope creates flame graphs&lt;/h2&gt;
&lt;p&gt;This diagram shows how code is turned into a flame graph.
In this case, Pyroscope samples the stacktrace of your application to understand how many CPU cycles are spent in each function.
It then aggregates this data and turns it into a flame graph.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/code-to-flamegraph-animation.gif&#34;
  alt=&#34;code to flame graph diagram&#34; width=&#34;1366&#34;
     height=&#34;768&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;what-does-a-flame-graph-represent&#34;&gt;What does a flame graph represent?&lt;/h2&gt;
&lt;p&gt;Horizontally, the flame graph represents 100% of the time that this application was running.
The width of each node represents the amount of time spent in that function.
The wider the node, the more time spent in that function. The narrower the node, the less time spent in that function.&lt;/p&gt;
&lt;p&gt;Vertically, the nodes in the flame graph represent the hierarchy of functions called and time spent in each function.
The top node is the root node and represents the total amount of time spent in the application.
The nodes below it represent the functions called and time spent in each function.
The nodes below those represent the functions called from those functions and time spent in each function.
This continues until you reach the bottom of the flame graph.&lt;/p&gt;
&lt;p&gt;This is a CPU profile, but profiles can represent many other types of resource such as memory, network, disk, etc.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-flamegraph-2023-11-30.png&#34;
  alt=&#34;flame graph&#34; width=&#34;915&#34;
     height=&#34;446&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;flame-graph-visualization-panel-ui&#34;&gt;Flame graph visualization panel UI&lt;/h2&gt;
&lt;p&gt;To learn more about the flame graph user interface in Grafana, Grafana Cloud, and Grafana Profiles Drilldown, refer to &lt;a href=&#34;/docs/grafana-cloud/visualizations/panels-visualizations/visualizations/flame-graph/&#34;&gt;Flame graph visualization panel&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To learn more about the flame graph in the Pyroscope UI, refer to 
    &lt;a href=&#34;/docs/pyroscope/v1.18.x/view-and-analyze-profile-data/pyroscope-ui/&#34;&gt;Pyroscope UI&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

        
]]></content><description>&lt;h1 id="flame-graphs">Flame graphs&lt;/h1>
&lt;div data-shared="intro/flame-graphs.md">
&lt;!-- Flame graphs: Visualizing performance data -->
&lt;p>Flame graphs provide a visual summary of your profile data.
A flame graph is a complete visualization of hierarchical data, for example stack trace and, file system contents, with a metric, typically resource usage, attached to the data.&lt;/p></description></item><item><title>Profiling and tracing integration</title><link>https://grafana.com/docs/pyroscope/v1.18.x/introduction/profile-tracing/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/introduction/profile-tracing/</guid><content><![CDATA[&lt;h1 id=&#34;profiling-and-tracing-integration&#34;&gt;Profiling and tracing integration&lt;/h1&gt;


&lt;div data-shared=&#34;datasources/pyroscope-profile-tracing-intro.md&#34;&gt;
            &lt;!-- Profiling and tracing integration --&gt;
&lt;p&gt;Profiles, continuous profiling, and distributed traces are all tools that can be used to improve the performance and reliability of applications.
However, each tool has its own strengths and weaknesses, and it is important to choose the right tool for the job as well as understand when to use both.&lt;/p&gt;
&lt;h2 id=&#34;profiling&#34;&gt;Profiling&lt;/h2&gt;
&lt;p&gt;Profiling offers a deep-dive into an application&amp;rsquo;s performance at the code level, highlighting resource usage and performance hotspots.&lt;/p&gt;
&lt;table&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Usage&lt;/th&gt;
    &lt;td&gt;During development, major releases, or upon noticing performance quirks.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Benefits&lt;/th&gt;
    &lt;td&gt;
      &lt;ul&gt;
        &lt;li&gt;Business: Boosts user experience through enhanced application performance.&lt;/li&gt;
        &lt;li&gt;Technical: Gives clear insights into code performance and areas of refinement.&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Example&lt;/th&gt;
    &lt;td&gt;A developer uses profiling upon noting slow app performance, identifies a CPU-heavy function, and optimizes it.&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;h2 id=&#34;continuous-profiling&#34;&gt;Continuous profiling&lt;/h2&gt;
&lt;p&gt;Continuous profiling provides ongoing performance insights, capturing long-term trends and intermittent issues.&lt;/p&gt;
&lt;table&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Usage&lt;/th&gt;
    &lt;td&gt;Mainly in production, especially for high-priority applications.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Benefits&lt;/th&gt;
    &lt;td&gt;
      &lt;ul&gt;
        &lt;li&gt;Business: Preemptively addresses inefficiencies, potentially saving costs.&lt;/li&gt;
        &lt;li&gt;Technical: Highlights performance trends and issues like potential memory leaks over time.&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Example&lt;/th&gt;
    &lt;td&gt;A month-long data from continuous profiling suggests increasing memory consumption, hinting at a memory leak.&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;h2 id=&#34;distributed-tracing&#34;&gt;Distributed tracing&lt;/h2&gt;
&lt;p&gt;Traces requests as they cross multiple services, revealing interactions and service dependencies.&lt;/p&gt;
&lt;table&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Usage&lt;/th&gt;
    &lt;td&gt;Essential for systems like microservices where requests touch multiple services.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Benefits&lt;/th&gt;
    &lt;td&gt;
      &lt;ul&gt;
        &lt;li&gt;Business: Faster issue resolution, reduced downtimes, and strengthened customer trust.&lt;/li&gt;
        &lt;li&gt;Technical: A broad view of the system&#39;s structure, revealing bottlenecks and inter-service dependencies.&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Example&lt;/th&gt;
    &lt;td&gt;In e-commerce, a user&#39;s checkout request might involve various services. Tracing depicts this route, pinpointing where time is most spent.&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;h2 id=&#34;combined-power-of-tracing-and-profiling&#34;&gt;Combined power of tracing and profiling&lt;/h2&gt;
&lt;p&gt;When used together, tracing and profiling provide a powerful tool for understanding system and application performance.&lt;/p&gt;
&lt;table&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Usage&lt;/th&gt;
    &lt;td&gt;For comprehensive system-to-code insights, especially when diagnosing complex issues spread across services and codebases.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Benefits&lt;/th&gt;
    &lt;td&gt;
      &lt;ul&gt;
        &lt;li&gt;Business: Reduces downtime, optimizes user experience, and safeguards revenues.&lt;/li&gt;
        &lt;li&gt;Technical:
          &lt;ul&gt;
            &lt;li&gt;Holistic view: Tracing pinpoints bottle-necked services, while profiling delves into the responsible code segments.&lt;/li&gt;
            &lt;li&gt;End-to-end insight: Visualizes a request&#39;s full journey and the performance of individual code parts.&lt;/li&gt;
            &lt;li&gt;Efficient diagnosis: Tracing identifies service latency; profiling zeroes in on its cause, be it database queries, API calls, or specific code inefficiencies.&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th scope=&#34;row&#34;&gt;Example&lt;/th&gt;
    &lt;td&gt;Tracing reveals latency in a payment service. Combined with profiling, it&#39;s found that a particular function, making third-party validation calls, is the culprit. This insight guides optimization, refining system efficiency.&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;

        
]]></content><description>&lt;h1 id="profiling-and-tracing-integration">Profiling and tracing integration&lt;/h1>
&lt;div data-shared="datasources/pyroscope-profile-tracing-intro.md">
&lt;!-- Profiling and tracing integration -->
&lt;p>Profiles, continuous profiling, and distributed traces are all tools that can be used to improve the performance and reliability of applications.
However, each tool has its own strengths and weaknesses, and it is important to choose the right tool for the job as well as understand when to use both.&lt;/p></description></item><item><title>Pyroscope and profiling in Grafana</title><link>https://grafana.com/docs/pyroscope/v1.18.x/introduction/pyroscope-in-grafana/</link><pubDate>Wed, 08 Apr 2026 14:38:28 +0000</pubDate><guid>https://grafana.com/docs/pyroscope/v1.18.x/introduction/pyroscope-in-grafana/</guid><content><![CDATA[&lt;!-- This is placeholder page while we get the content written.  --&gt;
&lt;h1 id=&#34;pyroscope-and-profiling-in-grafana&#34;&gt;Pyroscope and profiling in Grafana&lt;/h1&gt;
&lt;p&gt;Grafana Pyroscope can be used alongside other Grafana products such as Loki, Tempo, Mimir, and k6.
You can use Pyroscope to get the most granular insight into your application and how you can use it to fix issues that you may have identified using metrics, logs, traces, or anything else.&lt;/p&gt;
&lt;p&gt;Within Grafana and Grafana Cloud, you can use the 
    &lt;a href=&#34;/docs/grafana/latest/datasources/grafana-pyroscope/&#34;&gt;Pyroscope data source&lt;/a&gt; to query and visualize profile data from within Grafana.&lt;/p&gt;
&lt;h2 id=&#34;visualize-traces-and-profiles-data&#34;&gt;Visualize traces and profiles data&lt;/h2&gt;
&lt;p&gt;Here is a screenshot of the &lt;strong&gt;Explore&lt;/strong&gt; page that combines traces and profiles to be able to see granular line-level detail when available for a trace span.
This lets you see the exact function that&amp;rsquo;s causing a bottleneck in your application as well as a specific request.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-trace-profiler-view-2023-11-30.png&#34;
  alt=&#34;trace-profiler-view&#34; width=&#34;1421&#34;
     height=&#34;652&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;integrate-profiles-into-dashboards&#34;&gt;Integrate profiles into dashboards&lt;/h2&gt;
&lt;p&gt;Here is an example of how you can integrate profiles into your dashboards. In this case, the screenshot shows memory profiles alongside panels for logs and metrics to be able to debug OOM errors alongside the associated logs and metrics.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/grafana-pyroscope-dashboard-2023-11-30.png&#34;
  alt=&#34;dashboard&#34; width=&#34;1919&#34;
     height=&#34;936&#34;/&gt;&lt;/p&gt;
]]></content><description>&lt;!-- This is placeholder page while we get the content written. -->
&lt;h1 id="pyroscope-and-profiling-in-grafana">Pyroscope and profiling in Grafana&lt;/h1>
&lt;p>Grafana Pyroscope can be used alongside other Grafana products such as Loki, Tempo, Mimir, and k6.
You can use Pyroscope to get the most granular insight into your application and how you can use it to fix issues that you may have identified using metrics, logs, traces, or anything else.&lt;/p></description></item></channel></rss>