richat: add subscribe handshake observability#207
Merged
fanatid merged 5 commits intoMay 19, 2026
Conversation
e4a15ba to
3151a73
Compare
Add three metrics to diagnose 3-5s zero-byte stalls observed on new gRPC subscribers in EWR/LAX that cause clients to send RST_STREAM before any data reaches them. No behavioral fix yet — we first want one deploy's worth of data to tell us which latency actually dominates. Metrics added: - grpc_subscribe_filter_parse_seconds (histogram, labeled by x_subscription_id): seconds from subscribe2() entry until the SubscribeRequest is read off the wire and parsed into a Filter. - grpc_subscribe_time_to_first_message_seconds (histogram, labeled by x_subscription_id): seconds from the filter being applied until the worker loop pushes the first data message to the client. This is the latency the client actually perceives as "time to first byte of data". - grpc_subscribe_handshake_abandoned_total (counter, labeled by x_subscription_id): incremented when the client's request stream ends before a filter is ever set — i.e. client disconnected mid- handshake. Tells us how many stalls abandon pre-filter vs post-filter. Plus a one-shot warn! log inside the ping task when a client has been connected for >3s without a filter set. Threshold matches the observed client timeout window. Only the initial unset -> set transition is recorded for both histograms; subsequent filter updates (commitment change, etc.) are not part of the subscribe handshake and would skew the tails.
675782f to
a74ab39
Compare
Member
|
released as richat@10.1.0 - https://github.com/lamports-dev/richat/releases/tag/richat-v10.1.0 |
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.
Add three metrics to diagnose 3-5s zero-byte stalls observed on new gRPC subscribers in EWR/LAX that cause clients to send RST_STREAM before any data reaches them. No behavioral fix yet — we first want one deploy's worth of data to tell us which latency actually dominates.
Metrics added:
Plus a one-shot warn! log inside the ping task when a client has been connected for >3s without a filter set. Threshold matches the observed client timeout window.
Only the initial unset -> set transition is recorded for both histograms; subsequent filter updates (commitment change, etc.) are not part of the subscribe handshake and would skew the tails.