Skip to content

fix(metrics): scope Grafana reorg alert to unproven reorgs#24582

Draft
AztecBot wants to merge 1 commit into
nextfrom
cb/8e0a8374396e
Draft

fix(metrics): scope Grafana reorg alert to unproven reorgs#24582
AztecBot wants to merge 1 commit into
nextfrom
cb/8e0a8374396e

Conversation

@AztecBot

@AztecBot AztecBot commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

What

Make the Grafana "reorg" alert fire specifically on unproven reorgs (an unproven epoch being pruned back to the last proven checkpoint), rather than on the generic "prune" signal.

Why

The archiver emits two distinct prune-family events (yarn-project/archiver/src/modules/l1_synchronizer.ts):

  • L2PruneUnproven (handleEpochPrune) — the pending chain rewinds to the last proven checkpoint because an epoch was not proven in time. This is the real reorg we want to alert on.
  • L2PruneUncheckpointed — routine dropping of provisional/uncheckpointed blocks that never got a proposed checkpoint by the end of the build slot. This is expected churn, not a reorg.

Today aztec_archiver_prune_count is incremented only from the unproven path (ArchiverInstrumentation.processPrune, called once in handleEpochPrune), so the alert already tracks unproven reorgs — but nothing in the metric or the query makes that explicit, and it would silently start counting routine prunes if the uncheckpointed path were ever instrumented onto the same counter.

Changes

  • Telemetry (archiver / telemetry-client): tag aztec_archiver_prune_count with aztec.status="unproven" and document in processPrune that uncheckpointed pruning is deliberately excluded. Metric description updated to reflect it counts unproven-epoch reorgs.
  • Grafana alert (spartan/metrics/grafana/alerts/rules.yaml): filter the query on aztec_status="unproven", rename the alert to Chain - unproven reorg, and clarify the summary annotation.
  • Dashboards: the reorg annotation queries in fisherman.json, aztec_network.json, and network-tps.json now filter on aztec_status="unproven" for consistency.

The added label is emitted as a default zero-series, so the existing unfiltered dashboard panels/queries (increase(...), max(...)) continue to match the single unproven series unchanged.

Testing

Grafana JSON/YAML validated. The TypeScript change mirrors the existing proofsSubmittedCount pattern in the same file (createUpDownCounterWithDefault(meter, metric, { [attr]: [...] }) + .add(1, { [attr]: value })); a full yarn build was not run here because the workspace image is not yarn install-ed, but the change is type-identical to already-compiled code in the same file.


Created by claudebox · group: slackbot

@AztecBot AztecBot added ["ci-no-fail-fast"] Applied by ClaudeBox ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ["ci-no-fail-fast"] Applied by ClaudeBox claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant