#5600·pyroscope

Use <aggregate> label values for distributor-sampled profiles

Author: simonswineCreated Sep 8, 2026Updated Sep 8, 2026

Background

Distributor sampling can remove detailed information from sampled-out profiles while retaining their totals. For labels derived from removed data, this can cause label values to appear and disappear over time without explaining why.

Proposal

For sampled-out profiles, use <aggregate> as the value of labels whose original values can no longer be preserved.

For example, a time series grouped by function_name could show concrete function names for retained profiles and function_name="<aggregate>" for sampled-out profiles.

Motivation

This would:

  • Explain why specific label values appear and disappear.
  • Make the effect of distributor sampling visible in query results.
  • Preserve sampled totals without attributing them to an incorrect label value.
  • Help users distinguish missing data from intentionally aggregated data.

This does not need to block the current sampling work and can be implemented as a follow-up, potentially at query time rather than storage time.

Related work

  • #5354
  • #5409
  • #5444