Skip to content

feat(trace): add bounded prefill diagnostics and isolate observation faults - #5200

Open
Reinerzhou wants to merge 1 commit into
InternLM:mainfrom
Reinerzhou:feat/ttft-diagnostics-20261124
Open

Reinerzhou wants to merge 1 commit into
InternLM:mainfrom
Reinerzhou:feat/ttft-diagnostics-20261124

Conversation

@Reinerzhou

Copy link
Copy Markdown
Collaborator

Summary

Add bounded Prefill diagnostics to the existing OTLP request trace. For each PyTorch AR/ARSpec request, the inference span now summarizes chunk count and size, computed and recomputed tokens, local and external cache reuse, inter-chunk wait, preemption, and rescheduling. The summary is frozen only after the engine accepts Prefill completion. There are no per-chunk spans, tensor transfers for metrics, or GPU synchronizations.

Keep instrumentation fail-open: an accounting failure omits only that input's incomplete summary and cannot replace inference output or prevent later requests from being traced. Complete SSE framing is required before a terminal event is accepted. Remove the independent JSONL writer and use the SDK's standard batch export defaults. Existing span names and correlation fields remain unchanged. docs/en/serving/request_trace.md is the integration and implementation guide for this behavior.

Validation

  • python -m unittest discover -s tests/observability: 126 passed on the available serving environment after rebasing onto organization main.
  • git diff --check upstream/main...HEAD: passed.
  • Single-node 8×H200 AgentX throughput comparisons and matched request analysis are recorded separately; GPU tests were run on the feature code before this rebase.

…faults

Accumulate PyTorch AR/ARSpec chunk, recomputation, cache reuse and scheduling
summaries on the existing inference span. Freeze after accepted prefill
completion and isolate accounting failures to the affected input.

Keep OTLP export only, removing local JSONL output and its extra bookkeeping.
Preserve request output, errors and cancellation when observation fails;
keep subsequent requests observable. Retain existing span names and fields.
Use the SDK's 5-second batch default and require complete SSE terminal framing.

Update request_trace.md as the integration and implementation guide, and
cover exported spans, native accounting and fault recovery in regressions.

This branch has not been deployed

No deployments
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