Open source

Grafana Phlare Block format

In March 2023, Grafana Labs acquired Pyroscope, the company behind the eponymous open source continuous profiling project. As a result, the Pyroscope and Grafana Phlare projects will be merged under the new name Grafana Pyroscope. To learn more, read our recent blog post about the news.

This document describes how Grafana Phlare stores the data in its blocks. Each block belongs to a single tenant and is identfied by a unique [ULID]. Within the block there are multiple files:

  • A metadata file meta.json, which contains information about what the block contains, like the time range of the profiling data.

  • A TSDB index index.tsdb mapping the external labels to the profiles stored in the profiles table.

  • Parquet tables for the different models within a profile in the files profiles.parquet, stacktraces.parquet, locations.parquet, functions.parquet, mappings.parquet, strings.parquet.

Data model

The data model within the block is fairly aligned to Google’s proto definition for the pprof wire format. In general strings within the block are referenced by their position in a string table.

Grafana Phlare’s profiles have two types of labels:

  • External Labels: Contain additional information gathered at ingestion time and can be used to select certain profiles. They are comparable to Prometeus’/Loki’s label and typical labels are namespace and pod to describe which workload the profiles are coming form.

  • Pprof Labels: Part of the pprof payload and used by the agent or the software to transport additional information.

Each profile ingested will be added into a new row in the profile table. If there are entries missing in the tables for the different models they are also inserted.

Data model of Phlare blocks