Skip to content

Add rollout trace timeline viewer#1776

Merged
zhuzilin merged 3 commits intomainfrom
trace
Mar 28, 2026
Merged

Add rollout trace timeline viewer#1776
zhuzilin merged 3 commits intomainfrom
trace

Conversation

@zhuzilin
Copy link
Copy Markdown
Contributor

@zhuzilin zhuzilin commented Mar 28, 2026

The tracer and visualizer are implemented by Hanyu Zhang from Z.ai.

Copilot and others added 3 commits March 27, 2026 15:57
When a span has pd_ disaggregation attrs, render colored sub-segments
inside the bar showing the time split between phases:
- Blue: prefill forward, Green: decode forward
- Amber: transfer/transfer queue
- Sand/grey: bootstrap queue, prealloc, alloc waiting

Tooltip now groups phases by [P] and [D] instance with ms + percentage.
Legend row shows PD phase colors when PD data is present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Span items store attrs as {start_attrs: {...}, end_attrs: {...}} but all
PD visualization code (sub-bars, labels, tooltips, legend) was reading
item.attrs.pd_* at the top level. PD fields set via span.update() end up
in end_attrs, so they were never found.

Add spanFlatAttrs(item) helper that merges start_attrs and end_attrs into
a flat dict, and use it in all 4 call sites: drawSpan PD sub-bars, span
label builder, tooltip PD grouping, and legend PD detection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Hanyu Zhang <hanyu.zhang@aminer.cn>
@zhuzilin zhuzilin merged commit 0988f0f into main Mar 28, 2026
2 checks passed
@zhuzilin zhuzilin deleted the trace branch March 28, 2026 17:16
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