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

Synchronize Scope for Watchdog Events #4824

Open
philipphofmann opened this issue Feb 10, 2025 · 1 comment
Open

Synchronize Scope for Watchdog Events #4824

philipphofmann opened this issue Feb 10, 2025 · 1 comment

Comments

@philipphofmann
Copy link
Member

Description

We currently only synchronize crumbs of the scope for watchdog termination events. Most of the scope observer is empty see

- (void)setContext:(nullable NSDictionary<NSString *, id> *)context
{
// Left blank on purpose
}
- (void)setDist:(nullable NSString *)dist
{
// Left blank on purpose
}
- (void)setEnvironment:(nullable NSString *)environment
{
// Left blank on purpose
}
- (void)setExtras:(nullable NSDictionary<NSString *, id> *)extras
{
// Left blank on purpose
}
- (void)setFingerprint:(nullable NSArray<NSString *> *)fingerprint
{
// Left blank on purpose
}
- (void)setLevel:(enum SentryLevel)level
{
// Left blank on purpose
}
- (void)setTags:(nullable NSDictionary<NSString *, NSString *> *)tags
{
// Left blank on purpose
}
- (void)setUser:(nullable SentryUser *)user
{
// Left blank on purpose
}
- (void)setTraceContext:(nullable NSDictionary<NSString *, id> *)traceContext
{
// Left blank on purpose
}

We can consider storing the other not frequently changing information on a BG thread and read it from disk during SDK launch when the SDK detected a watchdog termination.

A customer recently reported that the user ID doesn't match the excepted one because they set the user ID not immediately when starting the SDK, so the user ID falls back to the randomly generated UUID, which confuses the user. This also applies to the rest of the scope.

@philipphofmann philipphofmann changed the title Synchronize Scope for Watchdog events Synchronize Scope for Watchdog Events Feb 11, 2025
@kahest
Copy link
Member

kahest commented Feb 12, 2025

We'll need to review individually which elements we want to persist to prevent too much I/O.

@kahest kahest moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants