Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(session-replay-browser): in memory events storage #895

Merged
merged 8 commits into from
Oct 10, 2024

Conversation

lewgordon-amplitude
Copy link

@lewgordon-amplitude lewgordon-amplitude commented Oct 7, 2024

Summary

Do not merge, still testing with the tasks app

Currently, we store events using indexedDB (IDB). However, it's not possible in all cases where we want to capture replays that IDB is present. This PR adds an in-memory version of the event store that can either be the default store or will be the fallback if IDB is not present. The storage API is not quite stable yet and the implementation to make both stores unified needs a bit of work. This is small holdover to help in certain situations and to prevent a very large initial PR.

Sorry for the long PR! This was an attempt at the minimal amount of changes with a few quality of life things thrown in.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@lewgordon-amplitude lewgordon-amplitude changed the title AMP-112171 in memory events storage feat(session-replay-browser): in memory events storage Oct 7, 2024
@lewgordon-amplitude lewgordon-amplitude force-pushed the AMP-112171-in-memory-provider branch from 2382649 to 1215806 Compare October 9, 2024 19:15
…dexedDB is not present

fix(session-replay-browser): unifying how the memory splitting works
test(session-replay-browser): add coverage for events-idb-store

test(session-replay-browser): base event store

test(session-replay-browser): in memory store tests

test(session-replay-browser): config coverage

test(session-replay-browser): fix tests from refactor
@lewgordon-amplitude lewgordon-amplitude force-pushed the AMP-112171-in-memory-provider branch from 1215806 to 5b15d87 Compare October 9, 2024 19:18
@lewgordon-amplitude lewgordon-amplitude marked this pull request as ready for review October 9, 2024 19:48
Copy link

@jxiwang jxiwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM

@lewgordon-amplitude lewgordon-amplitude merged commit 85f4fd1 into v1.x Oct 10, 2024
4 checks passed
@lewgordon-amplitude lewgordon-amplitude deleted the AMP-112171-in-memory-provider branch October 10, 2024 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants