Skip to content

starknet_transaction_prover: bump prover_panics_total on panic hook fire#14170

Open
avi-starkware wants to merge 1 commit into
avi/prover-v3/http-metricsfrom
avi/prover-v3/panic-counter
Open

starknet_transaction_prover: bump prover_panics_total on panic hook fire#14170
avi-starkware wants to merge 1 commit into
avi/prover-v3/http-metricsfrom
avi/prover-v3/panic-counter

Conversation

@avi-starkware
Copy link
Copy Markdown
Collaborator

Bumps the new prover_panics_total counter from the panic hook before
constructing the backtrace, so dashboards can alert on panic rate without
log search. The pre-registered zero observation in install_exporter
keeps the series visible at scrape time even before the first panic.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

@cursor
Copy link
Copy Markdown

cursor Bot commented May 24, 2026

PR Summary

Low Risk
Observability-only change to metrics and the existing panic hook; no change to proving, auth, or request handling behavior.

Overview
Adds a prover_panics_total Prometheus counter so panic rate can be alerted on without log search. The metric is defined in metrics::names, pre-registered at zero in install_exporter (same pattern as other counters), and incremented at the start of the panic hook before backtrace capture and structured logging—so a recursive failure in those steps still counts the original panic.

A unit test asserts the hook bumps the counter by one when installed with a shared test recorder.

Reviewed by Cursor Bugbot for commit 646fb1e. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Collaborator Author

avi-starkware commented May 24, 2026

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from cbd1def to e503ebd Compare May 24, 2026 16:48
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from 51ebd37 to 6c02d2b Compare May 24, 2026 16:48
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from e503ebd to db503b7 Compare May 26, 2026 08:43
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from 2af08ad to 47068b1 Compare May 26, 2026 12:16
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from db503b7 to 1da27e9 Compare May 26, 2026 12:16
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from 47068b1 to eea5655 Compare May 26, 2026 12:17
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 1da27e9 to ac98d86 Compare May 26, 2026 12:17
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ac98d86. Configure here.

Comment thread crates/starknet_transaction_prover/src/server/panic_test.rs
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from ac98d86 to e4bbbdc Compare May 26, 2026 12:58
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from eea5655 to df42f2f Compare May 26, 2026 12:58
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from df42f2f to 83d004c Compare May 26, 2026 16:14
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from e4bbbdc to 06bb59e Compare May 26, 2026 16:14
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from 83d004c to 9122417 Compare May 26, 2026 16:47
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch 2 times, most recently from 0b2c8cc to 4b1caba Compare May 26, 2026 16:59
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from 9122417 to 23731d6 Compare May 26, 2026 16:59
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from 23731d6 to 145ff10 Compare May 27, 2026 10:01
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch 2 times, most recently from 05ed9b4 to 72918b7 Compare May 27, 2026 10:35
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch 2 times, most recently from 130f7f6 to 7fa5a6d Compare May 27, 2026 12:55
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 72918b7 to 74f4f46 Compare May 27, 2026 12:56
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from 7fa5a6d to fe8282d Compare May 27, 2026 13:11
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 74f4f46 to 728f22c Compare May 27, 2026 13:11
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from fe8282d to d9c346a Compare May 27, 2026 14:04
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 728f22c to 966f499 Compare May 27, 2026 14:04
Bumps the new `prover_panics_total` counter from the panic hook before
constructing the backtrace, so dashboards can alert on panic rate without
log search. The pre-registered zero observation in `install_exporter`
keeps the series visible at scrape time even before the first panic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avi-starkware avi-starkware force-pushed the avi/prover-v3/http-metrics branch from d9c346a to d3505a7 Compare May 27, 2026 14:20
@avi-starkware avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 966f499 to 646fb1e Compare May 27, 2026 14:20
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.

2 participants