fix(metrics): scope Grafana reorg alert to unproven reorgs#24582
Draft
AztecBot wants to merge 1 commit into
Draft
fix(metrics): scope Grafana reorg alert to unproven reorgs#24582AztecBot wants to merge 1 commit into
AztecBot wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_countis incremented only from the unproven path (ArchiverInstrumentation.processPrune, called once inhandleEpochPrune), 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
archiver/telemetry-client): tagaztec_archiver_prune_countwithaztec.status="unproven"and document inprocessPrunethat uncheckpointed pruning is deliberately excluded. Metric description updated to reflect it counts unproven-epoch reorgs.spartan/metrics/grafana/alerts/rules.yaml): filter the query onaztec_status="unproven", rename the alert toChain - unproven reorg, and clarify the summary annotation.fisherman.json,aztec_network.json, andnetwork-tps.jsonnow filter onaztec_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 singleunprovenseries unchanged.Testing
Grafana JSON/YAML validated. The TypeScript change mirrors the existing
proofsSubmittedCountpattern in the same file (createUpDownCounterWithDefault(meter, metric, { [attr]: [...] })+.add(1, { [attr]: value })); a fullyarn buildwas not run here because the workspace image is notyarn install-ed, but the change is type-identical to already-compiled code in the same file.Created by claudebox · group:
slackbot