Skip to content

fix(metrics): observe query durations in seconds - #1225

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

chriswessels wants to merge 1 commit into
graphprotocol:mainfrom
graphops:chris/qos-duration-seconds

Conversation

@chriswessels

Copy link
Copy Markdown

Indexer-query histograms receive milliseconds in both query paths, and the targeted client-query path also records milliseconds, while ordinary client queries record seconds. A 250 ms observation is therefore recorded as 250 instead of 0.25 in histograms with default seconds buckets.

Route duration observations through Duration-accepting methods that convert to seconds, and document the unit in metric help text. Tests verify sample count, sum, and every finite default bucket for a 250 ms observation. Metric names remain unchanged; historical mixed-unit observations must be analyzed separately across the deployment boundary.

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