-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Add globalHubMode
to options
#3805
Conversation
|
Performance metrics 🚀
|
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.
LGTM 👍
@@ -279,10 +278,12 @@ private static void init(final @NotNull SentryOptions options, final boolean glo | |||
return; | |||
} | |||
|
|||
final boolean globalHubModeToUse = |
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.
(l) getting an IDE warning here for a possible null-pointer due to options.isGlobalHubMode changing between checks. We could extract a final Boolean globalHubModeFromOptions = options.isGlobalHubMode()
and use that in the ternary operator
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.
Ah yeah, forgot to do that, will update
📜 Description
globalHubMode
used to only be a param onSentry.init
. To make it easier to be used in e.g. Desktop environments, we now additionally added it as an option onSentryOptions
that can also be set viasentry.properties
.We can consider deprecating and removing the
Sentry.init
overloads that have theglobalHubMode
parameter.If both the param on
Sentry.init
and the option are set, the option will win. By default the option is set tonull
meaning whatever is passed toSentry.init
wins.💡 Motivation and Context
Fixes #3779
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps