feat: 请求候选记录中追踪代理节点信息并在前端 timeline 展示

This commit is contained in:
fawney19
2026-02-08 01:18:00 +08:00
parent 4a1029961a
commit 254d30d32d
5 changed files with 44 additions and 5 deletions

View File

@@ -2654,6 +2654,8 @@ class CliMessageHandlerBase(BaseMessageHandler):
"chunk_count": ctx.chunk_count,
"data_count": ctx.data_count,
}
if ctx.proxy_info:
extra_data["proxy"] = ctx.proxy_info
if candidate_first_byte_time_ms is not None:
extra_data["first_byte_time_ms"] = candidate_first_byte_time_ms
if ctx.is_client_disconnected():
@@ -2680,6 +2682,8 @@ class CliMessageHandlerBase(BaseMessageHandler):
"chunk_count": ctx.chunk_count,
"data_count": ctx.data_count,
}
if ctx.proxy_info:
extra_data["proxy"] = ctx.proxy_info
if ctx.rectified:
extra_data["rectified"] = True
if candidate_first_byte_time_ms is not None:

View File

@@ -351,6 +351,8 @@ class StreamTelemetryRecorder:
}
if ctx.rectified:
extra_data["rectified"] = True
if ctx.proxy_info:
extra_data["proxy"] = ctx.proxy_info
if ctx.first_byte_time_ms is not None:
# 计算候选自身的 TTFB
first_byte_time_ms = RequestCandidateService.calculate_candidate_ttfb(