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

Enrich every event with device and app context #1104

Closed
philipphofmann opened this issue May 3, 2021 · 2 comments · Fixed by #1822
Closed

Enrich every event with device and app context #1104

philipphofmann opened this issue May 3, 2021 · 2 comments · Fixed by #1822

Comments

@philipphofmann
Copy link
Member

Currently, the SentryCrashIntegration configures the Scope of the current Hub with the device and app data.

if (nil != [SentrySDK.currentHub getIntegration:integrationName]) {
[SentrySDK.currentHub configureScope:^(SentryScope *_Nonnull outerScope) {
// OS
NSMutableDictionary *osData = [NSMutableDictionary new];

This has the disadvantage when creating a Hub manually the client doesn't enrich the event with device and app data. Java uses an EventProcessor to achieve this.

This came up because we made Sentry.currentHub private in 7.0.0 and a user used this method just to initialize a Hub with the scope of the currentHub, see #434 (comment).

@marandaneto
Copy link
Contributor

using an EventProcessor also has its disadvantages, these trade-offs should be discussed before going forward though.

@philipphofmann
Copy link
Member Author

Instead of using an event processor, we could do this in prepare event

- (SentryEvent *_Nullable)prepareEvent:(SentryEvent *)event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants