Repository navigation
Conversation
azuruce
requested review from
ByronHsu,
CatherineSue,
DarkSharpness,
HaiShaw,
JustinTong0323,
ShangmingCai,
Ying1123,
fzyzcjy,
hnyls2002,
ispobock,
merrymercy,
slin1237,
sogalin,
sufeng-buaa,
wisclmy0611,
xiezhq-hermann and
zijiexia
as code owners
August 8, 2026 19:33
4 of 5 tasks
This branch has not been deployed
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.
Motivation
sglang:num_aborted_requests_totalcounts abort dispatches rather than mutually exclusive request failures. It also has no reason label, so operators cannot distinguish client disconnects from explicit cancellation, admission-control rejection, scheduler timeout, KV exhaustion, or request-processing errors.abort_alland completion/abort races make the legacy counter especially unsuitable as an abort-rate numerator.Modifications
AbortReasonenum and propagate an explicit reason through every built-in SGLang abort path.sglang:num_abort_signals_total{reason=...}for cancellation signals while preservingsglang:num_aborted_requests_totalfor compatibility.sglang:request_outcomes_total{is_streaming,outcome,reason}. Each metrics-enabled request is counted once when its terminal state is observed, after completion/abort races resolve.Accuracy Tests
Not applicable. This changes request lifecycle metadata and Prometheus counters, not model execution or outputs.
Speed Tests and Profiling
Not benchmarked. The new work is limited to bounded-label counter increments on abort dispatch and terminal request handling; it is not in the token-generation loop.
Validation
git diff --checkpass.FINISH_ABORT,prepare_abort, andAbortReqconstruction supplies an explicit reason.Checklist
CI States
Latest PR Test (Base): ❌ Run #31274727588
Latest PR Test (Extra): ❌ Run #31274727494