- {debugSettings.proxyDebugTraceEnabled ? '开启中,结果会自动刷新' : '尚未开启'}
+
+
+
+
最近调试追踪
+
+ 按最新 20 条展示,点击查看详情会打开完整请求与 attempt 链路。
+
+ {debugSettings.proxyDebugTraceEnabled ? '开启中,结果会自动刷新' : '尚未开启'}
+
+
- {debugPanelLoading && debugTraces.length === 0 ? (
-
加载调试追踪中...
- ) : debugTraces.length === 0 ? (
-
- {debugSettings.proxyDebugTraceEnabled
- ? '暂时还没有新追踪。这里只显示开启后产生的新请求,等下一次代理请求进入就会出现在这里。'
- : '调试追踪尚未开启。点击上方“开启调试”或“调试设置”后,新的代理请求会出现在这里。'}
-
- ) : (
-
- {debugTraces.map((trace) => (
-
- ))}
-
- )}
-
-
-
追踪详情
-
- 选择左侧一条追踪后查看完整请求与 attempt 链路
-
-
-
- {!selectedDebugTraceId ? (
-
- 暂无追踪详情。开启调试后等待新请求,或从左侧选择一条最近追踪。
-
- ) : selectedDebugTraceDetail?.loading ? (
-
加载追踪详情中...
- ) : selectedDebugTraceDetail?.error ? (
-
{selectedDebugTraceDetail.error}
- ) : selectedDebugTraceDetail?.data ? (
-
-
-
基础信息
-
-
下游路径:{selectedDebugTraceDetail.data.trace.downstreamPath || '-'}
-
Session:{selectedDebugTraceDetail.data.trace.sessionId || '-'}
-
模型:{selectedDebugTraceDetail.data.trace.requestedModel || '-'}
-
候选 endpoint:{selectedDebugTraceDetail.data.trace.endpointCandidatesJson || '-'}
-
最终上游路径:{selectedDebugTraceDetail.data.trace.finalUpstreamPath || '-'}
-
-
-
-
-
- 原始下游请求头
- {selectedDebugTraceDetail.data.trace.requestHeadersJson || '-'}
-
-
- 原始下游请求体
- {selectedDebugTraceDetail.data.trace.requestBodyJson || '-'}
-
-
- 最终响应
- {selectedDebugTraceDetail.data.trace.finalResponseBodyJson || '-'}
-
-
-
-
-
Attempt 记录
- {selectedDebugTraceDetail.data.attempts.length === 0 ? (
-
暂无 attempt 记录
- ) : (
- selectedDebugTraceDetail.data.attempts.map((attempt) => (
-
-
- #{attempt.attemptIndex + 1} · {attempt.endpoint} · {attempt.responseStatus ?? '-'} · {attempt.requestPath}
-
-
-{`targetUrl: ${attempt.targetUrl}
-runtimeExecutor: ${attempt.runtimeExecutor || '-'}
-recoverApplied: ${attempt.recoverApplied ? 'true' : 'false'}
-downgradeDecision: ${attempt.downgradeDecision ? 'true' : 'false'}
-downgradeReason: ${attempt.downgradeReason || '-'}
-
-requestHeaders:
-${attempt.requestHeadersJson || '-'}
-
-requestBody:
-${attempt.requestBodyJson || '-'}
-
-responseHeaders:
-${attempt.responseHeadersJson || '-'}
-
-responseBody:
-${attempt.responseBodyJson || '-'}
-
-rawErrorText:
-${attempt.rawErrorText || '-'}
-
-memoryWrite:
-${attempt.memoryWriteJson || '-'}`}
-
-
- ))
+ 查看详情
+
)}
-
-
- ) : (
-
- 暂无追踪详情。
-
- )}
-