Skip to content

Add missing information to watchdog termination events #5397

@philprime

Description

@philprime

Description

With #5242 we added the persistence of the context for watchdog terminations.

@metcalfealex reported in this PR comment that the fix worked as expected for context, but custom tags are still missing.

This is expected, as we only did a partial implementation due to growing complexity.
See these unimplemented methods:

- (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
}

The following need to be added as well:

  • Dist
  • Environment
  • Extras
  • Fingerprint
  • Level
  • Tags
  • User
  • TraceContext

With #5242 we introduced the concept of persistence stores (e.g. SentryScopeContextPersistentStore) and watchdog termination processors (e.g. SentryWatchdogTerminationBreadcrumbProcessor).

The processors are used to split the SentryWatchdogTerminationScopeObserver into multiple smaller "sub-observers/helper classes" for processing events.

The persistence stores are components used to abstract file operations and path management (a lightweight wrapper around SentryFileManager).

We should implement the processors and stores for the missing values above following this pattern, implementing them separately. This will gain new insights on shared utilities, so we can derive common functionality and move it to e.g. a SentryWatchdogTerminationBaseProcessor parent class and SentryScopePersistentBaseStore.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions