Skip to content

Commit

Permalink
add validity check
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin committed Oct 9, 2023
1 parent 1c438f2 commit 588e665
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin-server/src/worker/ingestion/process-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,9 @@ export const createSessionReplayEvent = (
const timestamps = events
.filter((e) => !!e?.timestamp)
.filter((e) => Math.sign(e.timestamp) === 1)
.map((e) => castTimestampOrNow(DateTime.fromMillis(e.timestamp), TimestampFormat.ClickHouse))
.map((e) => DateTime.fromMillis(e.timestamp))
.filter((e) => e.isValid)
.map((e) => castTimestampOrNow(e, TimestampFormat.ClickHouse))
.sort()

// but every event where chunk index = 0 must have an eventsSummary
Expand Down

0 comments on commit 588e665

Please sign in to comment.