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

Offline caching should support concurrent process instances #1067

Open
bruno-garcia opened this issue Jun 18, 2021 · 1 comment
Open

Offline caching should support concurrent process instances #1067

bruno-garcia opened this issue Jun 18, 2021 · 1 comment

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Jun 18, 2021

Currently the CacheDirectoryPath property enabled offline caching of events, and the persistency of the "InstalationId" that uniquely identifies a device without any privacy concerns (it's a random ID so can't be related to any other information to identify a user across apps).

This path is used as a base, and a sub directory Sentry is created followed by a hash of the DSN (to make sure different apps using Sentry don't share any data).

One use case that is not covered is when multiple instances of the same app (so using the same DSN) are executed at the same time. Different SDK instances will race through accessing the caching directory.

The behavior we'd expect is:

  • Installation Id is shared across all instances of the same app. But not of different apps (so must live inside the DSN hash folder)
  • All Sentry related files are under a folder called Sentry
  • Session state is not shared across different instances of the same app. In other words, if you have 2 notepad instances open, each will have its own session and hence its own cache file of it to survive app restarts
  • Envelopes cached (captured files) are not shared across different instances of the app
  • When an app starts, files from previous runs (that are not longer running) should be captured
@bruno-garcia
Copy link
Member Author

Two past attempts to address this. Worth reading the PR reviews:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants