We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 922c34f commit 9a5e7c0Copy full SHA for 9a5e7c0
packages/cli-v3/src/mcp/formatters.ts
@@ -236,7 +236,11 @@ function formatSpan(
236
237
// Format span header
238
const statusIndicator = getStatusIndicator(span.data);
239
- const duration = formatDuration(span.data.duration);
+ // Trace durations from ClickHouse are nanoseconds, from Postgres are milliseconds.
240
+ // Normalize: values over 1e6 are nanoseconds (1e6 ns = 1ms; 1e6 ms = 16min).
241
+ const durationMs =
242
+ span.data.duration > 1_000_000 ? span.data.duration / 1_000_000 : span.data.duration;
243
+ const duration = formatDuration(durationMs);
244
const startTime = formatDateTime(span.data.startTime);
245
246
lines.push(`${indent}${prefix} [${span.id}] ${span.data.message} ${statusIndicator}`);
0 commit comments