-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Feat: Add native SDK information in the replay option event #4663
base: main
Are you sure you want to change the base?
Conversation
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b695b61 | 1221.71 ms | 1249.18 ms | 27.47 ms |
0589699 | 1243.25 ms | 1252.60 ms | 9.35 ms |
3ea21f5 | 1250.80 ms | 1258.88 ms | 8.08 ms |
407ff99 | 1190.89 ms | 1237.18 ms | 46.29 ms |
904d7fa | 1225.73 ms | 1249.22 ms | 23.49 ms |
c471221 | 1224.16 ms | 1241.59 ms | 17.43 ms |
1928267 | 1200.94 ms | 1227.17 ms | 26.23 ms |
09311b6 | 1238.67 ms | 1255.04 ms | 16.37 ms |
ed49f0c | 1215.94 ms | 1245.63 ms | 29.69 ms |
973d574 | 1240.86 ms | 1255.83 ms | 14.98 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b695b61 | 21.90 KiB | 707.65 KiB | 685.75 KiB |
0589699 | 21.58 KiB | 656.60 KiB | 635.02 KiB |
3ea21f5 | 22.84 KiB | 402.63 KiB | 379.78 KiB |
407ff99 | 20.76 KiB | 427.86 KiB | 407.10 KiB |
904d7fa | 20.76 KiB | 432.87 KiB | 412.11 KiB |
c471221 | 22.85 KiB | 413.89 KiB | 391.04 KiB |
1928267 | 22.30 KiB | 730.78 KiB | 708.47 KiB |
09311b6 | 21.58 KiB | 654.67 KiB | 633.09 KiB |
ed49f0c | 21.58 KiB | 632.13 KiB | 610.55 KiB |
973d574 | 21.58 KiB | 542.38 KiB | 520.80 KiB |
Previous results on branch: feat/sdk-info-sr-tags
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
32a98c1 | 1227.61 ms | 1252.87 ms | 25.26 ms |
b7ac501 | 1230.59 ms | 1253.66 ms | 23.07 ms |
7cdca55 | 1240.24 ms | 1256.24 ms | 16.00 ms |
37adb91 | 1240.06 ms | 1261.49 ms | 21.43 ms |
62c1f93 | 1236.84 ms | 1256.41 ms | 19.56 ms |
8e3d9eb | 1225.58 ms | 1258.66 ms | 33.08 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
32a98c1 | 22.32 KiB | 762.11 KiB | 739.79 KiB |
b7ac501 | 22.32 KiB | 761.95 KiB | 739.63 KiB |
7cdca55 | 22.32 KiB | 761.54 KiB | 739.22 KiB |
37adb91 | 22.31 KiB | 761.39 KiB | 739.08 KiB |
62c1f93 | 22.31 KiB | 761.40 KiB | 739.08 KiB |
8e3d9eb | 22.31 KiB | 768.84 KiB | 746.52 KiB |
…sentry-cocoa into feat/sdk-info-sr-tags
Sources/Sentry/include/SentrySessionReplayIntegration+Private.h
Outdated
Show resolved
Hide resolved
Sources/Sentry/include/SentrySessionReplayIntegration+Private.h
Outdated
Show resolved
Hide resolved
Sources/Sentry/include/SentrySessionReplayIntegration+Private.h
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4663 +/- ##
=============================================
+ Coverage 91.225% 91.231% +0.005%
=============================================
Files 624 624
Lines 72083 72141 +58
Branches 26221 26237 +16
=============================================
+ Hits 65758 65815 +57
- Misses 6229 6230 +1
Partials 96 96
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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
@@ -248,6 +248,7 @@ class SentrySessionReplay: NSObject { | |||
private func captureSegment(segment: Int, video: SentryVideoInfo, replayId: SentryId, replayType: SentryReplayType) { | |||
let replayEvent = SentryReplayEvent(eventId: replayId, replayStartTimestamp: video.start, replayType: replayType, segmentId: segment) | |||
|
|||
replayEvent.sdk = self.replayOptions.sdkInfo |
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.
we should also set the same sdkInfo to the envelope header, which this replay event is a part of. And from what I see we don't set this sdkInfo
to the default global one when initialized, which means we'll nullify the sdk context if we're not running on a hybrid SDK, right? @philprime @philipphofmann could you guys do that or should I take care while Dhiogo is out?
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.
Not sure if I know how to do that yet, would be great if you or @philipphofmann can do it, with me reviewing the changes so I know afterwards.
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'm confused by this PR; see #4663 (review).
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 will try to align this PR with how we do this in Java:
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, I think we should still align with the Java approach. Using sdkInfo as a dict is acceptable, but I think we should get rid of storing the native SDK info in the Meta.
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 think Java is wrong in this case.
The nativeSDKName and nativeSDKVersion in the replay tags should never be overwritten.
@romtsn Am I missing something here?
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's up to us I guess.. most important is the version and that one will be correct (i.e. the hybrid SDKs keep the native version in there), and the name doesn't really matter, since we all know it's gonna be android or ios sdk depending on what replay you're watching
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.
This is PR highly confusing to me. The SentryMeta sdkName and SDKVersion can be changed, and only SR events would use the nativeVersionString and nativeSDKName. All other Sentry data uses the SentryMeta sdkName and sdkVersion. @romtsn, do you use a similar approach on Android? If yes, what are the reasons for that?
Replay needs the information of the native SDK on top of the hybrid SDK info. |
📜 Description
Added cocoa name and version in the session replay options event for easy investigation.
💚 How did you test it?
Unit test
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps