Files
go-otel/otel-ui/src/lib/trace-summary.ts
T
mats 49f9bb3458
Build and Publish / Metadata (push) Successful in 2s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 1m3s
materialized view and a bit better ui
2026-09-19 12:43:17 +02:00

17 lines
502 B
TypeScript

import type { ProcessedTrace } from "../components/TraceVisualization"
import type { TraceSummary } from "./types"
/** Same shape the server returns, derived from a fully loaded trace (for lists built from live data). */
export function summarizeTrace(t: ProcessedTrace): TraceSummary {
return {
id: t.id,
name: t.name,
startTime: t.startTime,
endTime: t.endTime,
duration: t.duration,
spanCount: t.spans.length,
errorCount: t.errorCount,
services: t.services,
}
}