Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
007c5b60
Unverified
Commit
007c5b60
authored
Jan 04, 2026
by
ishandhanani
Committed by
GitHub
Jan 04, 2026
Browse files
fix: sglang metrics and prefill router fix (#5147)
parent
e5502e78
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
components/src/dynamo/sglang/publisher.py
components/src/dynamo/sglang/publisher.py
+1
-0
components/src/dynamo/sglang/request_handlers/llm/prefill_handler.py
...src/dynamo/sglang/request_handlers/llm/prefill_handler.py
+15
-0
tests/utils/payloads.py
tests/utils/payloads.py
+2
-2
No files found.
components/src/dynamo/sglang/publisher.py
View file @
007c5b60
...
@@ -254,6 +254,7 @@ def setup_prometheus_registry(
...
@@ -254,6 +254,7 @@ def setup_prometheus_registry(
endpoint
=
generate_endpoint
,
endpoint
=
generate_endpoint
,
registry
=
registry
,
registry
=
registry
,
metric_prefix_filters
=
[
"sglang:"
],
metric_prefix_filters
=
[
"sglang:"
],
add_prefix
=
"sglang_"
,
)
)
return
registry
return
registry
...
...
components/src/dynamo/sglang/request_handlers/llm/prefill_handler.py
View file @
007c5b60
...
@@ -96,6 +96,21 @@ class PrefillWorkerHandler(BaseWorkerHandler):
...
@@ -96,6 +96,21 @@ class PrefillWorkerHandler(BaseWorkerHandler):
bootstrap_room
=
self
.
_generate_bootstrap_room
()
bootstrap_room
=
self
.
_generate_bootstrap_room
()
logging
.
debug
(
f
"Generated bootstrap_room locally:
{
bootstrap_room
}
"
)
logging
.
debug
(
f
"Generated bootstrap_room locally:
{
bootstrap_room
}
"
)
bootstrap_info
=
{
"bootstrap_host"
:
self
.
bootstrap_host
,
"bootstrap_port"
:
self
.
bootstrap_port
,
"bootstrap_room"
:
bootstrap_room
,
}
# Yield bootstrap_info for PrefillRouter - required for async generator contract
# and Rust-side expects disaggregated_params in first output
yield
{
"token_ids"
:
[],
"text"
:
None
,
"finish_reason"
:
None
,
"disaggregated_params"
:
bootstrap_info
,
}
input_param
=
self
.
_get_input_param
(
inner_request
)
input_param
=
self
.
_get_input_param
(
inner_request
)
# Propagate trace context to SGLang
# Propagate trace context to SGLang
...
...
tests/utils/payloads.py
View file @
007c5b60
...
@@ -559,8 +559,8 @@ class MetricsPayload(BasePayload):
...
@@ -559,8 +559,8 @@ class MetricsPayload(BasePayload):
metrics_to_check
.
append
(
metrics_to_check
.
append
(
MetricCheck
(
MetricCheck
(
# Check: Minimum count of unique sglang:* metrics
# Check: Minimum count of unique sglang:* metrics
name
=
"sglang
:
*"
,
name
=
"sglang
_
*"
,
pattern
=
lambda
name
:
r
"^sglang
:
\w+"
,
pattern
=
lambda
name
:
r
"^sglang
_
\w+"
,
validator
=
lambda
value
:
len
(
set
(
value
))
validator
=
lambda
value
:
len
(
set
(
value
))
>=
20
,
# 80% of typical ~25 sglang metrics (excluding _bucket) as of 2025-10-22 (but will grow)
>=
20
,
# 80% of typical ~25 sglang metrics (excluding _bucket) as of 2025-10-22 (but will grow)
error_msg
=
lambda
name
,
value
:
f
"Expected at least 20 unique sglang:* metrics, but found only
{
len
(
set
(
value
))
}
"
,
error_msg
=
lambda
name
,
value
:
f
"Expected at least 20 unique sglang:* metrics, but found only
{
len
(
set
(
value
))
}
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment