starknet_transaction_prover: HTTP request count + latency + in-flight metrics - #14169
starknet_transaction_prover: HTTP request count + latency + in-flight metrics#14169avi-starkware wants to merge 2 commits into
Conversation
PR SummaryLow Risk Overview The layer sits below Reviewed by Cursor Bugbot for commit 17f4f71. Bugbot is set up for automated code reviews on this repo. Configure here. |
7d179cb to
a0e7299
Compare
6c02d2b to
2af08ad
Compare
00671e6 to
68683f0
Compare
47068b1 to
eea5655
Compare
00f7551 to
b51be4a
Compare
eea5655 to
df42f2f
Compare
df42f2f to
83d004c
Compare
b51be4a to
396774b
Compare
83d004c to
9122417
Compare
6f17bb1 to
fb01d37
Compare
9122417 to
23731d6
Compare
fb01d37 to
f1b98e4
Compare
4486906 to
89add21
Compare
dc79487 to
d9dd37a
Compare
89add21 to
e069793
Compare
d9dd37a to
dce9c4b
Compare
e069793 to
39763da
Compare
dce9c4b to
511c82e
Compare
39763da to
8f4079d
Compare
511c82e to
ed936b5
Compare
8f4079d to
5889543
Compare
ed936b5 to
935d7ae
Compare
5889543 to
91aef4f
Compare
91aef4f to
3757a1e
Compare
935d7ae to
278e99a
Compare
3757a1e to
72e94de
Compare
278e99a to
8cc0720
Compare
72e94de to
cfb4202
Compare
553107d to
ce52272
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 ce52272. Configure here.
| ); | ||
|
|
||
| // The gauge is back at zero, so the guard ran for every request. | ||
| assert_eq!(metric_value(&scrape, names::IN_FLIGHT_REQUESTS), 0.0); |
There was a problem hiding this comment.
Flaky absolute in-flight gauge assert
Low Severity
The in-flight check uses an absolute scrape value of 0.0, while this file’s own header notes that the Prometheus recorder is process-global and other tests (including ones that drive HttpMetricsLayer) run in parallel. A concurrent in-flight request can make this assertion fail intermittently, and a steady 0 also does not prove GaugeGuard ran because preregistration already sets the gauge to zero.
Reviewed by Cursor Bugbot for commit ce52272. Configure here.
ce52272 to
e8c7c31
Compare
51e5b16 to
fd9f317
Compare
8db9f7a to
5a282cd
Compare
… metrics Adds `HttpMetricsLayer` between the monitoring endpoints and the rest of the stack, so probes and scrapes don't distort the request-latency distribution. It records request count by bounded method/status labels, end-to-end latency, and an in-flight gauge. A shared test recorder helper installs the global Prometheus recorder once across the test binary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…xclusion Gives the HTTP latency histogram explicit bucket bounds so it exports as a histogram rather than a summary, replaces `InFlightGuard` with a shared `GaugeGuard` that owns the increment as well as the decrement, and pre-registers the 4xx/5xx series so an error-rate alert doesn't read an absent one. A new test pins the probe exclusion, which layer order alone had been enforcing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>



Adds
HttpMetricsLayerplaced between the monitoring endpoints and therest of the stack so probes/scrapes don't distort the request-latency
distribution. Records request count by bounded method/status labels,
end-to-end latency, and in-flight gauge. Also adds a shared test recorder
helper that installs the global Prometheus recorder once across the
test binary.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com