-
-
Notifications
You must be signed in to change notification settings - Fork 444
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 1 - Introduce IScopes
interface.
#3297
Conversation
|
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.
Commented on three instances where the HubScopesWrapper
could be used to make it compile when -Werror
is disabled.
Otherwise LGTM 👍
void reportFullyDisplayed(); | ||
|
||
/** | ||
* @deprecated See {@link IHub#reportFullyDisplayed()}. |
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.
Replace IHub
with IScopes
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public interface IScopes { |
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.
Is there a specific reason we name it plural IScopes
instead of IScope
?
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.
IScope
is already present (i.e. the scope) and IScopes
is a set of multiple scopes (isolation scope and current scope) which (sometimes) fork together or separately. IScopes
(and Scopes
) is meant to be a drop-in replacement for hub.
* @deprecated See {@link IHub#reportFullyDisplayed()}. | ||
*/ | ||
@Deprecated | ||
default void reportFullDisplayed() { |
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.
Given that we'll do a major bump I guess it's worth considering removing deprecated methods.
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.
Created #3364 to track and added it to 8.0.0
milestone.
#skip-changelog
📜 Description
Tests on this PR will likely fail, there's more PRs migrating
IHub
references toIScopes
and fixing tests.TODO: this should target a new branch for a new major release.
IScopes
IHub
extendsIScopes
so anyHub
can be passed in asIScopes
. All methods onIHub
have been moved toIScopes
.IHub
and methods tied to it likegetCurrentHub
,cloneMainHub
andclone
have been deprecated.IHub
we're wrappingIScopes
usingHubScopesWrapper
Scopes
as a replacement forHub
ScopesAdapter
as a replacement forHubAdapter
Sentry.getCurrentScopes()
replacesSentry.getCurrentHub()
Sentry.cloneMainHub()
will be replaced in a follow up PR by something likeSentry.forkRootScopes()
or similar.TODO
comments in this PR that have to be cleaned up in follow up PRs.Follow up PRs for changing from
IHub
toIScopes
:IHub
withIScopes
in core #3298IHub
withIScopes
in Android core #3299IHub
withIScopes
in Android integrations #3300IHub
withIScopes
in apollo integrations #3301IHub
withIScopes
in OkHttp integration #3302IHub
withIScopes
in GraphQL integration #3303IHub
withIScopes
in logging integrations #3304IHub
withIScopes
in more integrations #3305IHub
withIScopes
in OTel integration #3306IHub
withIScopes
in Spring 5 / Spring Boot 2 integrations #3308IHub
withIScopes
in Spring 6 / Spring Boot 3 integrations #3309IHub
withIScopes
in samples #3310💡 Motivation and Context
This is the first PR of many to merge hubs and scopes which is a prerequisite for Performance powered by OpenTelemetry.
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps