Repository navigation
feat(metrics): histograms for bridge request latency and TOAST values per fetch - #255
Open
iskakaushik wants to merge 1 commit into
Open
iskakaushik wants to merge 1 commit into
iskakaushik wants to merge 1 commit into
Conversation
8 tasks
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 10, 2026 18:13
9cdcbec to
ed58b73
Compare
harshil-goel
marked this pull request as ready for review
November 10, 2026 18:15
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 10, 2026 19:30
ed58b73 to
bf0fc26
Compare
harshil-goel
changed the base branch from
main
to
kaushik/source-lag-metrics
November 10, 2026 19:38
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 10, 2026 20:22
bf0fc26 to
9d85078
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 10, 2026 21:31
9d85078 to
7451ef3
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 11, 2026 07:26
7451ef3 to
fa0e229
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 11, 2026 07:48
fa0e229 to
7607fcc
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 11, 2026 08:58
7607fcc to
223d675
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 11, 2026 09:32
223d675 to
8b0c303
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 11, 2026 09:45
8b0c303 to
838dca1
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 11, 2026 11:38
838dca1 to
3252222
Compare
serprex
reviewed
Nov 11, 2026
| /// Upper bounds of the bridge request-latency buckets: 25us doubling to | ||
| /// 102.4ms, which spans a local socket round trip through a worker stalled on | ||
| /// slow storage. Slower requests land in `+Inf` | ||
| pub const REQUEST_LATENCY_BOUNDS_NANOS: [u64; REQUEST_LATENCY_BUCKETS] = { |
Member
There was a problem hiding this comment.
why have const array when this is basic function 25_000 << x
Makes me think we should support HistogramFn or there's something wrong with the Historgram concept
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 17, 2026 10:08
3252222 to
0a7577d
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 18, 2026 05:11
0a7577d to
d8918f1
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 18, 2026 08:12
d8918f1 to
d5f95c0
Compare
harshil-goel
force-pushed
the
kaushik/bridge-latency-histograms
branch
from
November 18, 2026 08:44
d5f95c0 to
0b039a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Histograms where only means existed.
walshadow_request_duration_seconds{database,target="bridge",op}+Infwalshadow_toast_values_per_fetch+InfExisting counters are unchanged.
Implementation
Histogram<FIRST, N>inops/metrics.rs: lock-free,Nbuckets starting atFIRSTand doubling. The bounds are part of the type, so observe and snapshot cannot disagree. One relaxed add on the bucket and one on the sum per observation. Bootstrap and live bridges of one database fold into one series. A scrape racing an observation can see the count one ahead of the sum.PromQL
Tests
histograms_render_cumulative_buckets_per_seriescovers the boundary, overflow, merge, rendering, and the reallevalues 0.000025 and 0.0064exposition_parses_as_openmetricsdb_series_folds_bootstrap_bridge_into_the_database_it_restoredresolver_mem_stores_and_fetches