Skip to content

fix(metrics): initialize request counters at zero - #1227

Open
chriswessels wants to merge 1 commit into
graphprotocol:mainfrom
graphops:chris/qos-counter-initialization
Open

chriswessels wants to merge 1 commit into
graphprotocol:mainfrom
graphops:chris/qos-counter-initialization

Conversation

@chriswessels

Copy link
Copy Markdown

Constructing ResponseMetrics increments both request counters, fabricating one successful and one failed client query at startup.

Use the counters' registered zero values and let request handling increment them. This preserves metric registration and labels while making startup totals accurate.

Validation (on this independent branch):

  • cargo +nightly-2026-06-11 fmt --all -- --check
  • cargo +1.95.0 clippy --all-targets --all-features -- -Dwarnings --force-warn deprecated --force-warn dead-code
  • cargo +1.95.0 test

@chriswessels
chriswessels marked this pull request as ready for review October 29, 2026 13:48
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.

1 participant