File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,8 @@ export const loader = createLoaderApiRoute(
5454 return json ( { error : "Span not found" } , { status : 404 } ) ;
5555 }
5656
57- // Postgres eventRepository returns duration in ms, ClickHouse returns nanoseconds
58- const isClickhouse =
59- run . taskEventStore === "clickhouse" || run . taskEventStore === "clickhouse_v2" ;
60- const durationMs = isClickhouse ? span . duration / 1_000_000 : span . duration ;
57+ // Duration is nanoseconds from ClickHouse (Postgres store is deprecated)
58+ const durationMs = span . duration / 1_000_000 ;
6159
6260 const aiData =
6361 span . properties && typeof span . properties === "object"
Original file line number Diff line number Diff line change @@ -236,11 +236,8 @@ function formatSpan(
236236
237237 // Format span header
238238 const statusIndicator = getStatusIndicator ( span . data ) ;
239- // 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 ) ;
239+ // Trace durations are nanoseconds from ClickHouse
240+ const duration = formatDuration ( span . data . duration / 1_000_000 ) ;
244241 const startTime = formatDateTime ( span . data . startTime ) ;
245242
246243 lines . push ( `${ indent } ${ prefix } [${ span . id } ] ${ span . data . message } ${ statusIndicator } ` ) ;
You can’t perform that action at this time.
0 commit comments