-
-
Couldn't load subscription status.
- Fork 460
Hubs/Scopes Merge 23 - Use new API for CRONS integrations #3347
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
Conversation
…pes-merge-2-add-scopes
…ainScopes to rootScopes
|
| return; | ||
| } | ||
| scopes.pushScope(); | ||
| final @NotNull ISentryLifecycleToken lifecycleToken = scopes.pushIsolationScope(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this it likely makes sense to have it isolated.
| } | ||
|
|
||
| scopes.pushScope(); | ||
| final @NotNull ISentryLifecycleToken lifecycleToken = scopes.pushIsolationScope(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure here, maybe we should make it configurable whether this isolates or not (pushScope vs. pushIsolationScope). The @SentryCheckIn annotation may be used on jobs but can also be used on any method where it may not make sense to isolate but rather keep e.g. the request scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default should probably be isolated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah makes sense!
If any user code within invocation.proceed(); performs changes via the static API, e.g. Sentry.setTag(), those will be written to the isolation scope which is created here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, static API and configureScope default to isolation scope for non Android.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more I think about API, the more I think we should just find a sane default and only deliver that as a starting point. We can always add more API if users actually ask for it.
| final @Nullable MonitorConfig monitorConfig, | ||
| final @NotNull Callable<U> callable) | ||
| throws Exception { | ||
| final @NotNull ISentryLifecycleToken lifecycleToken = Sentry.pushIsolationScope(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should also be configurable to use pushScope or pushIsolationScope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default should probably also be isolated. Add overload with isolated: true/false, defaulting to true
Performance metrics 🚀
|
#skip-changelog
📜 Description
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps