Skip to content

feat(pbs): count the ws bid stream under its own metrics endpoint - #499

Open
JasonVranek wants to merge 1 commit into
mainfrom
feat/get-header-stream-metrics
Open

feat(pbs): count the ws bid stream under its own metrics endpoint#499
JasonVranek wants to merge 1 commit into
mainfrom
feat/get-header-stream-metrics

Conversation

@JasonVranek

Copy link
Copy Markdown
Collaborator

Summary

The websocket bid stream recorded its outcome and time-to-first-bid under get_header, the same series as the HTTP fallback, so a slot served by the fallback was indistinguishable from one served by the stream. Stream attempts now count under endpoint="get_header_stream"; the fallback keeps get_header.

Four new metrics cover what a stream does that HTTP cannot:

  • relay_stream_connect_latency: websocket handshake duration, with sub-second buckets
  • relay_stream_updates: bid updates received per stream window
  • relay_stream_invalid_frames_total: frames that could not be parsed as a bid
  • relay_stream_fallback_total: handshake failures that had budget left to retry over HTTP

A handshake answered 2xx instead of 101 now reports the transport error (556) instead of the 2xx, which the stream series would otherwise read as a delivered bid. The two synthetic status codes are compile-time constants.

@JasonVranek
JasonVranek requested a review from a team September 11, 2026 03:14
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