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

Hubs/Scopes Merge 21 - Allow controlling which scope configureScope uses #3345

Merged
merged 26 commits into from
Apr 22, 2024

Conversation

adinauer
Copy link
Member

#skip-changelog

📜 Description

A default ScopeType can be set in SentryOptions which defaults to ISOLATION for JVM (backend, etc.) and CURRENT for Android. This default scope is then used for configureScope when no explicit ScopeType is passed.

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Apr 12, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 3d6f2fe

@@ -169,8 +169,8 @@ public void withScope(@NotNull ScopeCallback callback) {
}

@Override
public void configureScope(@NotNull ScopeCallback callback) {
scopes.configureScope(callback);
public void configureScope(@Nullable ScopeType scopeType, @NotNull ScopeCallback callback) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: I guess we should do the same for withScope

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, will add in a follow up PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this has the same problem as having an overload for forkedScope where withScope(ISOLATION) ... forks both isolation and current scope which might be confusing.

Maybe having another method called withIsolationScope, as RFC suggests, is better but very similar.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding withIsolationScope in a follow up PR

Base automatically changed from feat/hsm-20-use-separate-scopes to 8.x.x April 19, 2024 12:28
@adinauer adinauer merged commit a941eb8 into 8.x.x Apr 22, 2024
4 of 20 checks passed
@adinauer adinauer deleted the feat/hsm-21-configure-scope-configurable branch April 22, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants