Hubs / Scopes Merge 17 - Add global scope#3319
Merged
Conversation
…pes-merge-2-add-scopes
Contributor
|
adinauer
commented
Apr 4, 2024
| /** The Main Hub or NoOp if Sentry is disabled. */ | ||
| private static volatile @NotNull IScopes mainScopes = NoOpScopes.getInstance(); | ||
| // TODO cannot pass options here | ||
| private static volatile @NotNull IScope globalScope = new Scope(new SentryOptions()); |
Member
Author
There was a problem hiding this comment.
It should be possible for users to set data on global scope even before Sentry.init. Not quite sure where we should go with implementation. Likely we'll need a Scope constructor that doesn't require options and set options later on. Not quite sure how that should affect limits (e.g. for breadcrumbs) etc.
Contributor
Performance metrics 🚀
|
markushi
approved these changes
Apr 18, 2024
Member
markushi
left a comment
There was a problem hiding this comment.
LGTM, assuming all todos will be followed up later.
lbloder
approved these changes
Apr 19, 2024
Member
Author
TODOs have been resolved in #3362 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#skip-changelog
📜 Description
Add global scope.
💡 Motivation and Context
Certain things should be globally accessable (default client, throwable to span map, ...).
This will also allow users to set certain things globally without worrying about Sentry.init or risking lost updates.
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps