Menu

This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

Grafana Cloud Enterprise Open source

Query profile data

You can query your profile data using the built-in data source query editor or you can use the open source Grafana Explore Profiles app.

Explore Profiles

Explore Profiles is a native Grafana application designed to integrate seamlessly with Pyroscope, the open source continuous profiling platform, providing a smooth, queryless experience for browsing and analyzing profiling data.

You can use Explore Profiles in Grafana Cloud or in your own Grafana instance. For more information, refer to Access or install Explore Profiles.

Use cases

There are several different modes for viewing, analyzing, and comparing profiling data.

The main use cases are the following:

  • Proactive: Cutting costs, addressing latency issues, or optimizing memory usage for applications
  • Reactive: Resolving incidents with line-level accuracy or debugging active latency/memory issues

Explore Profiles provides an intuitive interface to specifically support these use cases. You get a holistic view of all of your services and how they’re functioning, but also the ability to drill down for more targeted root cause analysis.

Explore Profiles offers a convenient platform to analyze profiles and get insights that are impossible to get from using other traditional signals like logs, metrics, or tracing.

Give it a try using Grafana Play
Give it a try using Grafana Play

With Grafana Play, you can explore and see how it works, learning from practical examples to accelerate your development. This feature can be seen on the Grafana Play site.

Continuous profiling

While code profiling has been a long-standing practice, continuous profiling represents a modern and more advanced approach to performance monitoring.

This technique adds two critical dimensions to traditional profiles:

Time
Profiling data is collected continuously, providing a time-centric view that allows querying performance data from any point in the past.
Metadata
Profiles are enriched with metadata, adding contextual depth to the performance data.

These dimensions, coupled with the detailed nature of performance profiles, make continuous profiling a uniquely valuable tool.

Flame graphs

Flame graphs help you visualize resource allocation and performance bottlenecks, and you even get suggested recommendations and performance fixes via AI-driven flame graph analysis, as well as line-level insights from our GitHub integration.

On views with a flame graph, you can use Explain flame graph to provide an AI flame graph analysis that explains the performance bottleneck, root cause, and recommended fix. For more information, refer to Flame graph AI.

Pyroscope query editor

The Pyroscope data source query editor gives you access to a profile type selector, a label selector, and collapsible options.

Like Explore Profiles, the query editor also provides a flame graph to visualize data.

Query editor

To access the query editor:

  1. Sign into Grafana or Grafana Cloud.

  2. Select your Pyroscope data source.

  3. From the menu, choose Explore.

  4. Select a profile type from the drop-down menu.

    Profile selector
    Profile selector
  5. Use the labels selector input to filter by labels. Pyroscope uses similar syntax to Prometheus to filter labels. Refer to Pyroscope documentation for available operators and syntax.

    While the label selector can be left empty to query all profiles without filtering by labels, you must select a profile type or app for the query to be valid.

    Grafana doesn’t show any data if the profile type or app isn’t selected when a query runs.

    Labels selector

  6. Expand the Options section to view Query Type and Group by. Options section

  7. Select a query type to return the profile data. Data is shown in the Flame Graph, metric data visualized in a graph, or both. You can only select both options in Explore. The panels used on dashboards allow only one visualization.

Using Group by, you can group metric data by a specified label. Without any Group by label, metric data aggregates over all the labels into single time series. You can use multiple labels to group by. Group by only effects the metric data and doesn’t change the profile data results.

Profiles query results

Profiles can be visualized in a flame graph. Refer to the Flame Graph documentation to learn about the visualization and its features.

Flame graph

Pyroscope returns profiles aggregated over a selected time range. The absolute values in the flame graph grow as the time range gets bigger while keeping the relative values meaningful. You can zoom in on the time range to get a higher granularity profile up to the point of a single scrape interval.

Metrics query results

Metrics results represent the aggregated sum value over time of the selected profile type.

Metrics graph

This allows you to quickly see any spikes in the value of the scraped profiles and zoom in to a particular time range.