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

cursor Bot commented May 24, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Observability-only change to the existing panic hook; unwinding and serving behavior are unchanged.

Overview
Adds a prover_panics_total Prometheus counter so operators can alert on panic rate without log queries.

The global panic hook now increments the counter before structured logging and backtrace capture, so a failure during logging cannot drop the count. install_exporter pre-registers the series at zero so /metrics always includes it. README observability and panic sections document the metric and recommend alerting on a rising rate.

Tests gain a mutex around panic-hook cases and a new check that each hooked panic bumps the counter by one.

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

avi-starkware commented May 24, 2026

Copy link
Copy Markdown
Collaborator Author

@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
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/panic-counter branch from 0f1f75f to 4bdd233 Compare July 9, 2026 08:08
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/http-metrics branch from fd26d99 to e128166 Compare July 9, 2026 11:39
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 4bdd233 to 7954230 Compare July 9, 2026 11:39

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 7954230. Configure here.

Comment thread crates/starknet_transaction_prover/src/server/panic.rs
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 7954230 to c85d523 Compare July 9, 2026 12:29
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/http-metrics branch 2 times, most recently from dc79487 to d9dd37a Compare July 12, 2026 12:39
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch from c85d523 to 3dd3f7b Compare July 12, 2026 12:39
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/http-metrics branch from d9dd37a to dce9c4b Compare July 13, 2026 11:45
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch 2 times, most recently from cf545e6 to 0b8beaa Compare July 19, 2026 12:24
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/http-metrics branch 2 times, most recently from 511c82e to ed936b5 Compare July 19, 2026 12:31
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 0b8beaa to f97d247 Compare July 19, 2026 12:31
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/http-metrics branch from ed936b5 to 935d7ae Compare July 19, 2026 13:15
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch from f97d247 to 33c9cd5 Compare July 19, 2026 13:15
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 33c9cd5 to 9efc43a Compare August 25, 2026 08:23
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/http-metrics branch from 935d7ae to 278e99a Compare August 25, 2026 08:23
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch from 9efc43a to d3fe724 Compare August 25, 2026 10:14
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/http-metrics branch from 278e99a to 8cc0720 Compare August 25, 2026 10:14
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch from d3fe724 to e1815f6 Compare August 25, 2026 19:09
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/http-metrics branch 2 times, most recently from 553107d to ce52272 Compare August 26, 2026 09:54
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/panic-counter branch from e1815f6 to 57ee518 Compare August 26, 2026 09:54
@avi-starkware
avi-starkware force-pushed the avi/prover-v3/http-metrics branch from ce52272 to e8c7c31 Compare August 26, 2026 13:15
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>
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