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.
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
fix: Finish transaction for external view controllers #3440
fix: Finish transaction for external view controllers #3440
Changes from 7 commits
cf9f8da
24839d4
a9cc9a8
c441887
2c5f1f5
a236c95
a60eff5
58708cf
ce79a00
cd449ad
bd6b7ce
bfbf299
9ef9f2d
c0c330e
cff8050
ed603af
00668a1
49bfca6
129c342
0141922
10fc126
8e7f7a0
ea2c5ea
b17cbd7
ecb0372
527e6fc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
h
: The inAppInclude is a prefix. We must change this to usinghasPrefix
.The InAppLogic does the same see
sentry-cocoa/Sources/Sentry/SentryInAppLogic.m
Line 35 in b064665
I think it's a good idea to refactor the code so both this code here and the
InAppLogic
use the same code so we only have to change it once.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.
I didn't notice this behaviour of inAppLogic, but I have a problem with it.
If I add
Awesome
to my inAppLogic it will match theAwesome
lib and alsoCore-Awesome
Data-Awesome
andPrivate-Awesome
.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.
No, it won't. The logic uses
hasPrefix
on thelastPathComponent
. If you addAwesome
to your inAppLogicCore-Awesome
,Data-Awesome
, andPrivate-Awesome
won't be inApp, whileAwesome-Core
would be. I think we should stick to this logic.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.
h
: Just double-checking why this works now: Previously, we only looked for UIViewControllers in the image of the app delegate class. Now we use inAppIncludes which per default includes theCFBundleExecutable
which is basically the same image of the app delegate class. Could it happen that the UIApplication returned byfindApp
is not in theCFBundleExecutable
? If yes, this would be a breaking change and we still should callswizzleAllSubViewControllersInApp
after swizzling the inApp ones. There is no risk of double swizzling because if we already swizzled the UIViewController again swizzling it does nothing if I'm not mistaken.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.
@brustolin, please answer the question above ⬆️.
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 this to cause
SentryTimeToDisplayTracker.framesTrackerHasNewFrame
to be called, ending the span it's managing? If so, please mention it here, or whatever other side effect is desired.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.
It does not call
SentryTimeToDisplayTracker.framesTrackerHasNewFrame
it callsSentryTimeToDisplayTracker.reportNewFrame
which cause SentryTimeToDisplayTracker to report a new frame to all its delegate. This desired side effect is described in the comment above.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.
So the reason I asked about
SentryTimeToDisplayTracker.framesTrackerHasNewFrame
is because when I looked atSentryTimeToDisplayTracker.reportNewFrame
and clicked through to the delegate call, the only option that comes up isSentryTimeToDisplayTracker.framesTrackerHasNewFrame
:So either we're both right or there's something else going on? Please let us know the mechanism.
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.
Yes, you're right, I misread the class name you wrote. reportNewFrame is a function of
SentryFramesTracker
that will callframesTrackerHasNewFrame
from its delegates.