Repository navigation
feat(metrics): server accept, read, service and write phases on /metrics - #541
Conversation
Turns on may_minihttp's op-timing feature: the HTTP server records accept_to_first_byte, read_parse, service, response_write and request_total in op_duration_seconds{component="may_minihttp.server"} and open_connections, accept_backlog and accept_backlog_limit in op_gauge, rendered by the existing microscaler_timing::render_prometheus call on /metrics. They cover the time a client sees before BRRTRouter's own timers start (accept queue, request read) and after they stop (response write). may_minihttp moves to the integration branch head with the feature.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: a2f26b99-541d-42aa-83ba-0ccf12889d12) |
|
Test note. |
Turns on may_minihttp's
op-timingfeature (microscaler/may_minihttp#16).op_duration_seconds{component="may_minihttp.server"}:accept_to_first_byte,read_parse,service,response_write,request_total.op_gauge:open_connections,accept_backlog,accept_backlog_limit(Linux; the last two fromTCP_INFOon the listening socket at scrape time).Both families go out through the
microscaler_timing::render_prometheuscall that/metricsalready makes (#540).They cover the time a client sees outside BRRTRouter's own timers: the accept queue and the request read before them, the response write after them. A load test showed small writes at 150-200 ms p95 at the client, against 10-60 ms of handler time and 0.1 ms of request queue. These metrics place the gap.
Change: one feature flag on the may_minihttp dependency, and the lockfile moved to the may_minihttp integration branch head.
cargo test --libpasses and the disallowed-methods gate passes.Note
Low Risk
Observability-only dependency feature and lockfile updates; no request routing or auth logic changes in the diff.
Overview
Enables
op-timingon themay_minihttpgit dependency so the HTTP server exposes accept/read/service/write timing and connection gauges through the existingmicroscaler-timing//metricspipeline (documented inline inCargo.toml).The lockfile pins a newer
may_minihttpintegration commit (addslibcandmicroscaler-timingthere) and bumpsmicroscaler-timing/ macro crates onmicroscaler-observabilitymain. Transitivewindows-sysentries shift slightly (mostly 0.61.2 → 0.60.2); no application source changes in this diff.Reviewed by Cursor Bugbot for commit addd9bf. Bugbot is set up for automated code reviews on this repo. Configure here.