fix(tracing): Remove isInstanceOf check in Transaction constructor#5046
Merged
fix(tracing): Remove isInstanceOf check in Transaction constructor#5046
isInstanceOf check in Transaction constructor#5046Conversation
- fixes wrong Hub being initialized when `isInstanceOf` fails incorrectly - simplify `Transaction._hub` initialization
Contributor
size-limit report 📦
|
lforst
approved these changes
May 6, 2022
Contributor
lforst
left a comment
There was a problem hiding this comment.
Looks good to me although I still wonder why that isInstanceOf call returns false.
Member
Author
|
yes, me too. Katie and I are gonna take a look at it next Thursday. You're very welcome to join. |
isInstanceOf check in Hub constructorisInstanceOf check in Transaction constructor
AbhiPrasad
pushed a commit
that referenced
this pull request
May 30, 2022
fix a bug which assigned the wrong Hub instance to a Transaction in the Transaction constructor. Remove the isInstanceOf check which incorrectly failed when passing a user-created Hub the constructor. Overall, simplify the hub initialization by deciding in the constructor if the passed Hub should be used. As a fallback, the Hub returned from getCurrentHub is used. Co-authored by: @lobsterkatie
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.
This PR fixes a bug which assigned the wrong
Hubinstance to aTransactionin theTransactionconstructor. It removes theisInstanceOfcheck which incorrectly failed when passing a user-createdHubthe constructor. Overall, the PR simplifies the hub initialization by deciding in the constructor if the passedHubshould be used. As a fallback, theHubreturned fromgetCurrentHubis used.This fix was originally created by @lobsterkatie in 7.x...temp-5-5-fix-hub-in-transaction-constructor.
ref: https://getsentry.atlassian.net/browse/ISSUE-1402