Skip to content

Commit

Permalink
fix: Reporting of recording viewed (#17410)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite authored Sep 13, 2023
1 parent 450f9d9 commit 1a2fffb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ export const sessionRecordingDataLogic = kea<sessionRecordingDataLogicType>([

if (nextSourceToLoad) {
actions.loadRecordingSnapshotsV2(nextSourceToLoad)
} else {
actions.reportUsageIfFullyLoaded()
}
},
loadRecordingSnapshotsV1Success: ({ sessionPlayerSnapshotData }) => {
Expand All @@ -254,8 +252,6 @@ export const sessionRecordingDataLogic = kea<sessionRecordingDataLogicType>([

if (values.sessionPlayerSnapshotData?.next) {
actions.loadRecordingSnapshotsV1(values.sessionPlayerSnapshotData?.next)
} else {
actions.reportUsageIfFullyLoaded()
}
if (values.chunkPaginationIndex === 1 || values.loadedFromBlobStorage) {
// Not always accurate that recording is playable after first chunk is loaded, but good guesstimate for now
Expand All @@ -265,10 +261,12 @@ export const sessionRecordingDataLogic = kea<sessionRecordingDataLogicType>([
size: (values.sessionPlayerSnapshotData?.snapshots ?? []).length,
duration: Math.round(performance.now() - cache.snapshotsStartTime),
}

actions.reportViewed()
}
},
loadRecordingSnapshotsSuccess: () => {
actions.reportViewed()
actions.reportUsageIfFullyLoaded()
},
loadRecordingSnapshotsV1Failure: () => {
actions.loadRecordingSnapshotsFailure()
},
Expand Down

0 comments on commit 1a2fffb

Please sign in to comment.