Skip to content

refactor(distributor): remove deprecated receivedDecompressedBytes metric#5292

Open
faisalaffan wants to merge 4 commits into
grafana:mainfrom
faisalaffan:fix/remove-deprecated-metric
Open

refactor(distributor): remove deprecated receivedDecompressedBytes metric#5292
faisalaffan wants to merge 4 commits into
grafana:mainfrom
faisalaffan:fix/remove-deprecated-metric

Conversation

@faisalaffan

Copy link
Copy Markdown

What

Remove the deprecated pyroscope_distributor_received_decompressed_bytes
histogram metric from the distributor, which has been marked TODO remove
and self-documented as deprecated in its own help text.

Why

This metric was superseded by pyroscope_distributor_received_decompressed_bytes_total,
which provides finer-grained observability with stage labels (received, sampled,
normalized) instead of only tracking a single processing stage with type labels.

The replacement observeProfileSize() helper was already being called at all three
processing stages — the deprecated metric was simply a duplicate observation that
added no value.

Changes

  • Distributor: Remove receivedDecompressedBytes field, histogram creation,
    registration, and the observe call at the sampled stage
  • Validation: Update stale comment in usage_groups.go that referenced the
    removed metric name
  • Distributor: Preserve existing TODO about using req.TotalBytesUncompressed
    at the sampled stage as a proper doc comment

Dashboard Migration (follow-up)

Dashboard queries in operations/ still reference pyroscope_distributor_received_decompressed_bytes.
These need migration to _total with appropriate stage selectors — the label structure
changed from {type, tenant} to {tenant, stage}.

Testing

  • All 160 distributor tests pass
  • All validation tests pass

…tric

This metric has been superseded by receivedDecompressedBytesTotal which
provides finer-grained observability with stage labels (received,
sampled, normalized) instead of only tracking the sampled stage.

The replacement observeProfileSize() helper is already called at all
three processing stages (StageReceived, StageSampled, StageNormalized).
…etric

The deprecated distributor_received_decompressed_bytes metric has been
removed. This metric tracks the same data with an additional usage_group
label.
Keep the existing TODO about using req.TotalBytesUncompressed for the
sampled stage metric, but format it as a proper comment above the call
rather than an inline trailing comment that was lost when removing
the deprecated receivedDecompressedBytes metric.
@cla-assistant

cla-assistant Bot commented Jun 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant