fix(metrics): add /v1/messages to route_to_endpoint match#1564
Conversation
Without this, all Messages API metrics from the HTTP router get bucketed under "other" instead of the existing ENDPOINT_MESSAGES label. Signed-off-by: Eric Zhang <eric@thinkingmachines.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a single route-to-endpoint mapping in the metrics utility. The ChangesMetrics Endpoint Mapping
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
👋 The PR description doesn't fully follow
Please update the PR description so reviewers have the context they need. |
| "/v1/completions" => metrics_labels::ENDPOINT_COMPLETIONS, | ||
| "/v1/rerank" => metrics_labels::ENDPOINT_RERANK, | ||
| "/v1/responses" => metrics_labels::ENDPOINT_RESPONSES, | ||
| "/v1/messages" => metrics_labels::ENDPOINT_MESSAGES, |
There was a problem hiding this comment.
🟣 Pre-existing: Other HTTP routes with defined ENDPOINT_* constants are also missing from this match — notably /v1/embeddings (ENDPOINT_EMBEDDINGS) and /v1/classify (ENDPOINT_CLASSIFY). They'll silently bucket under "other" just like /v1/messages did before this fix. Not blocking this PR, but worth a follow-up.
Without this, all Messages API metrics from the HTTP router get bucketed under "other" instead of the existing ENDPOINT_MESSAGES label.
Description
Problem
Solution
Changes
Test Plan
Checklist
cargo +nightly fmtpassescargo clippy --all-targets --all-features -- -D warningspassesSummary by CodeRabbit