fix(web-probe): restore analyzer runtime diagnostics visibility
This commit is contained in:
@@ -114,6 +114,9 @@ export function renderWebObserveAnalyzeTable(value: Record<string, unknown>): st
|
||||
const archiveMetrics = record(archiveSummary?.sampleMetrics);
|
||||
const archivePagePerformance = record(archiveSummary?.pagePerformance);
|
||||
const runtimeAlerts = record(analysis?.runtimeAlerts);
|
||||
const webPerformanceRuntime = record(analysis?.webPerformanceRuntimeDiagnostics);
|
||||
const webPerformanceRuntimeSummary = record(webPerformanceRuntime?.summary);
|
||||
const webPerformanceRuntimeGroups = webObserveArray(webPerformanceRuntime?.groups).map(record).filter((item): item is Record<string, unknown> => item !== null).slice(0, 4);
|
||||
const pagePerformance = record(analysis?.pagePerformance);
|
||||
const pagePerformanceSummary = record(pagePerformance?.summary);
|
||||
const nonEmptyRecord = (item: unknown): Record<string, unknown> | null => {
|
||||
@@ -456,6 +459,20 @@ export function renderWebObserveAnalyzeTable(value: Record<string, unknown>): st
|
||||
webObserveShort(webObserveText(item.sourceFunctionName ?? item.functionName ?? item.invoker), 42),
|
||||
webObserveShort(webObserveText(item.sourceURL ?? item.url), 64),
|
||||
]) : [["-", "-", "-", "-"]]),
|
||||
webObserveTable(["PAYLOADS", "PARSED", "PARSE_ISSUES", "RUNTIME_EVENTS", "GROUPS"], [[
|
||||
webObserveText(webPerformanceRuntimeSummary?.payloadRequestCount),
|
||||
webObserveText(webPerformanceRuntimeSummary?.payloadParsedCount),
|
||||
webObserveText(webPerformanceRuntimeSummary?.payloadParseIssueCount),
|
||||
webObserveText(webPerformanceRuntimeSummary?.runtimeDiagnosticCount),
|
||||
webObserveText(webPerformanceRuntimeSummary?.runtimeDiagnosticGroupCount),
|
||||
]]),
|
||||
webObserveTable(["DIAGNOSTIC", "REASON", "MODULE", "EVENTS", "FLUSH_MAX"], webPerformanceRuntimeGroups.length > 0 ? webPerformanceRuntimeGroups.map((item) => [
|
||||
webObserveShort(webObserveText(item.diagnosticCode ?? item.eventType), 36),
|
||||
webObserveShort(webObserveText(item.reason), 28),
|
||||
webObserveShort(webObserveText(item.module), 32),
|
||||
webObserveText(item.eventCount ?? item.count),
|
||||
webObserveText(item.maxFlushDurationMs),
|
||||
]) : [["-", "-", "-", "-", "-"]]),
|
||||
"",
|
||||
"Next:",
|
||||
` bun scripts/cli.ts web-probe observe collect ${id} --view turn-summary`,
|
||||
|
||||
Reference in New Issue
Block a user