Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: skip start_time clamping with new table layout (#10373)

Steffen Schmitze3fffda552ff
diff --git a/worker/src/backgroundMigrations/backfillEventsHistoric.ts b/worker/src/backgroundMigrations/backfillEventsHistoric.ts
index 834bfe8bc4..4f8214d9f0 100644
--- a/worker/src/backgroundMigrations/backfillEventsHistoric.ts
+++ b/worker/src/backgroundMigrations/backfillEventsHistoric.ts
@@ -302,7 +302,7 @@ export default class BackfillEventsHistoric implements IBackgroundMigration {
WHEN o.id = concat('t-', o.trace_id) THEN ''
ELSE coalesce(o.parent_observation_id, concat('t-', o.trace_id))
END AS parent_span_id,
- greatest(o.start_time, toDateTime64('1970-01-01', 3)) AS start_time,
+ o.start_time AS start_time,
o.end_time,
o.name,
o.type,
diff --git a/worker/src/features/eventPropagation/handleEventPropagationJob.ts b/worker/src/features/eventPropagation/handleEventPropagationJob.ts
index 68d9975973..2b0c89b880 100644
--- a/worker/src/features/eventPropagation/handleEventPropagationJob.ts
+++ b/worker/src/features/eventPropagation/handleEventPropagationJob.ts
@@ -299,8 +299,7 @@ export const handleEventPropagationJob = async (
ELSE coalesce(obs.parent_observation_id, concat('t-', obs.trace_id))
END AS parent_span_id,
-- Convert timestamps from DateTime64(3) to DateTime64(6) via implicit conversion
- -- Clamp start_time to 1970-01-01 or later (Unix epoch minimum) to avoid toUnixTimestamp() errors
- greatest(obs.start_time, toDateTime64('1970-01-01', 3)) AS start_time,
+ obs.start_time,
obs.end_time,
obs.name,
obs.type,
diff --git a/worker/src/features/eventPropagation/handleExperimentBackfill.ts b/worker/src/features/eventPropagation/handleExperimentBackfill.ts
index 9ab85702d5..eec1bb3d08 100644
--- a/worker/src/features/eventPropagation/handleExperimentBackfill.ts
+++ b/worker/src/features/eventPropagation/handleExperimentBackfill.ts
@@ -179,8 +179,8 @@ export async function getRelevantObservations(
WHEN o.id = concat('t-', o.trace_id) THEN ''
ELSE coalesce(o.parent_observation_id, concat('t-', o.trace_id))
END AS parent_span_id,
- greatest(o.start_time, toDateTime64('1970-01-01', 3)) AS start_time,
- o.end_time AS end_time,
+ o.start_time,
+ o.end_time,
o.name,
o.type,
coalesce(o.environment, '') AS environment,