Conversation
…pes-merge-2-add-scopes
…ainScopes to rootScopes
|
| @Nullable | ||
| public static IScope getCurrentScope() { | ||
| final @NotNull AtomicReference<IScope> scopeRef = new AtomicReference<>(); | ||
| // TODO [HSM] should this retrieve combined scope? |
There was a problem hiding this comment.
Yes, at least until cross-platform SDKs support separate scope types themselves.
| public @NotNull IScope clone() { | ||
| // TODO [HSM] just return a new CombinedScopeView with forked scope? | ||
| return getDefaultWriteScope().clone(); | ||
| return new CombinedScopeView(globalScope, isolationScope.clone(), scope.clone()); |
There was a problem hiding this comment.
The idea here is to have a clone that doesn't change the original so we're safer by cloning both isolation and current scope.
|
|
||
| @Override | ||
| public @NotNull ISentryClient getClient() { | ||
| // TODO [HSM] checking for noop here doesn't allow disabling via client, is that ok? |
There was a problem hiding this comment.
Discussed internally with backend team, if a customer needs this, they can provide their own noop ISentryClient that isn't actually NoOpSentryClient and thus not detected here.
| ISOLATION, | ||
| GLOBAL, | ||
|
|
||
| // TODO [HSM] do we need a combined as well so configureScope |
There was a problem hiding this comment.
Yes, at least for cross platform SDKs until they support different scope types separately themselves.
|
|
||
| } else { | ||
| final @NotNull IScopes forkedScopes = forkedCurrentScope("withScope"); | ||
| // TODO [HSM] should forkedScopes be made current inside callback? |
There was a problem hiding this comment.
Yes, I'd expect Sentry.setTag to operate on the forked scopes inside withScope
Performance metrics 🚀
|
| @@ -138,14 +139,17 @@ class InternalSentrySdkTest { | |||
| ) | |||
| // TODO [HSM] add breadcrumbs to all scopes and assert they are there | |||
There was a problem hiding this comment.
Is this comment still relevant?
#skip-changelog
📜 Description
To send values from all scope types (global, isolation, current) to cross platform SDKs we use
ScopeType.COMBINEDfor.configureScopeto retrieve all tags, breadcrumbs etc.💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps