Skip to content

Commit

Permalink
chore: log before dropping (#22308)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed May 15, 2024
1 parent e48a6de commit c2046d5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { URL } from 'url'

import { eventDroppedCounter } from '../../../main/ingestion-queues/metrics'
import { PreIngestionEvent, RawClickhouseHeatmapEvent, TimestampFormat } from '../../../types'
import { status } from '../../../utils/status'
import { castTimestampOrNow } from '../../../utils/utils'
import { isDistinctIdIllegal } from '../person-state'
import { captureIngestionWarning } from '../utils'
Expand Down Expand Up @@ -96,6 +97,10 @@ function extractScrollDepthHeatmapData(event: PreIngestionEvent): RawClickhouseH
}

if (!isValidNumber($viewport_height) || !isValidNumber($viewport_width)) {
status.warn('馃憖', '[extract-heatmap-data] dropping because invalid viewport dimensions', {
$viewport_height,
$viewport_width,
})
return drop('invalid_viewport_dimensions')
}

Expand Down

0 comments on commit c2046d5

Please sign in to comment.