Skip to content

Commit 051830a

Browse files
committed
fix: address second round of BugBot feedback
- Restore null fallback for span_id in formatSpanSimple: span.span_id ?? '' (defensive against runtime undefined from normalizeTraceSpan edge cases) - Unexport SPAN_TABLE_COLUMNS — only used internally by formatSpanTable, no external consumers
1 parent 995573a commit 051830a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/formatters/human.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ function formatSpanSimple(span: TraceSpan, opts: FormatSpanOptions): void {
11171117
line += ` ${plainSafeMuted(`(${prettyMs(durationMs)})`)}`;
11181118
}
11191119

1120-
line += ` ${plainSafeMuted(span.span_id)}`;
1120+
line += ` ${plainSafeMuted(span.span_id ?? "")}`;
11211121

11221122
lines.push(line);
11231123

src/lib/formatters/trace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export function spanListItemToFlatSpan(item: SpanListItem): FlatSpan {
416416
}
417417

418418
/** Column definitions for the flat span table */
419-
export const SPAN_TABLE_COLUMNS: Column<FlatSpan>[] = [
419+
const SPAN_TABLE_COLUMNS: Column<FlatSpan>[] = [
420420
{
421421
header: "Span ID",
422422
value: (s) => `\`${s.span_id}\``,

0 commit comments

Comments
 (0)