Grafana Pyroscope data source
Formerly Phlare data source, now Grafana Pyroscope, a horizontally scalable, highly-available, multi-tenant, OSS, continuous profiling aggregation system. Add it as a data source, and you are ready to query your profiles in Explore.
Configure the Grafana Pyroscope data source
To configure basic settings for the data source, complete the following steps:
Click Connections in the left-side menu.
Under Your connections, click Data sources.
Grafana Pyroscopein the search bar.
Click Grafana Pyroscope.
The Settings tab of the data source is displayed.
Set the data source’s basic configuration options:
A name to specify the data source in panels, queries, and Explore.
The default data source will be pre-selected for new panels.
The URL of the Grafana Pyroscope or Phlare instance, e.g.,
Enable basic authentication to the data source.
User name for basic authentication.
Password for basic authentication.
Used for queries returning timeseries data. Phlare backend, similar to Prometheus, scrapes profiles at certain intervals. To prevent querying at smaller interval use Minimal step same or higher than your Phlare scrape interval. For Pyroscope backend this prevents returning too many data points to the front end.
Query editor gives you access to a profile type selector, a label selector, and collapsible options.
Select a profile type from the drop-down menu. While the label selector can be left empty to query all profiles without filtering by labels, the profile type or app must be selected for the query to be valid. Grafana does not show any data if the profile type or app isn’t selected when a query is run.
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.
Options section contains a switch for Query Type and Group by.
Select a query type to return the profile data which can be shown in the Flame Graph, metric data visualized in a graph, or both. You can only select both options in a dashboard, because panels allow only one visualization.
Group by allows you to group metric data by a specified label. Without any Group by label, metric data is aggregated over all the labels into single time series. You can use multiple labels to group by. Group by has only an effect on the metric data and does not change the profile data results.
Profiles query results
Profiles can be visualized in a flame graph. See the Flame Graph documentation to learn about the visualization and its features.
Pyroscope returns profiles aggregated over a selected time range, and 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.
This allows you to quickly see any spikes in the value of the scraped profiles and zoom in to a particular time range.
Provision the Grafana Pyroscope data source
You can modify the Grafana configuration files to provision the Grafana Pyroscope data source. To learn more, and to view the available provisioning settings, see provisioning documentation.
Here is an example config:
apiVersion: 1 datasources: - name: Grafana Pyroscope type: grafana-pyroscope-datasource url: http://localhost:4040 jsonData: minStep: '15s'