-
-
Notifications
You must be signed in to change notification settings - Fork 336
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 |
---|---|---|---|
dd4145f | 1233.48 ms | 1254.35 ms | 20.88 ms |
6604dbb | 1248.35 ms | 1256.14 ms | 7.79 ms |
b4f8dba | 1343.92 ms | 1362.96 ms | 19.04 ms |
a0cc9d6 | 1232.37 ms | 1249.55 ms | 17.18 ms |
3cba0e8 | 1250.86 ms | 1258.39 ms | 7.53 ms |
fa38a2b | 1217.92 ms | 1235.52 ms | 17.60 ms |
728804f | 1341.16 ms | 1371.27 ms | 30.10 ms |
bef2003 | 1248.18 ms | 1258.86 ms | 10.68 ms |
7f14650 | 1236.00 ms | 1255.66 ms | 19.66 ms |
b9b0f0a | 1251.45 ms | 1257.86 ms | 6.41 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
dd4145f | 21.58 KiB | 540.09 KiB | 518.51 KiB |
6604dbb | 22.84 KiB | 402.56 KiB | 379.72 KiB |
b4f8dba | 21.58 KiB | 614.87 KiB | 593.29 KiB |
a0cc9d6 | 21.58 KiB | 706.46 KiB | 684.88 KiB |
3cba0e8 | 22.84 KiB | 403.19 KiB | 380.34 KiB |
fa38a2b | 21.58 KiB | 418.70 KiB | 397.12 KiB |
728804f | 22.85 KiB | 411.75 KiB | 388.91 KiB |
bef2003 | 22.85 KiB | 407.73 KiB | 384.88 KiB |
7f14650 | 22.84 KiB | 402.63 KiB | 379.78 KiB |
b9b0f0a | 20.76 KiB | 434.94 KiB | 414.18 KiB |
Previous results on branch: feat/sdk-info-sr-tags
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b7ac501 | 1230.59 ms | 1253.66 ms | 23.07 ms |
37adb91 | 1240.06 ms | 1261.49 ms | 21.43 ms |
7cdca55 | 1240.24 ms | 1256.24 ms | 16.00 ms |
32a98c1 | 1227.61 ms | 1252.87 ms | 25.26 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b7ac501 | 22.32 KiB | 761.95 KiB | 739.63 KiB |
37adb91 | 22.31 KiB | 761.39 KiB | 739.08 KiB |
7cdca55 | 22.32 KiB | 761.54 KiB | 739.22 KiB |
32a98c1 | 22.32 KiB | 762.11 KiB | 739.79 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 90.631% 90.670% +0.038%
=============================================
Files 621 621
Lines 71153 71191 +38
Branches 25310 25936 +626
=============================================
+ Hits 64487 64549 +62
+ Misses 6574 6545 -29
- Partials 92 97 +5
... and 19 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.
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?
versionString = sentryVersionString.copy; | ||
sdkName = sentrySdkName.copy; |
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.
m
: It's a good practice to do this check to avoid getting called multiple times in case we ever subclass this, see https://developer.apple.com/documentation/objectivec/nsobject/1418639-initialize.
if (self == [SentryMeta class]) {
}
/** | ||
* Used by hybrid SDKs to be able to configure SDK info for Session Replay | ||
*/ | ||
var sdkInfo: [String: Any]? |
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.
m
: We should set the intial value to the values of the SentryMeta.
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.
m
: We should use SentrySDKInfo here, convert it to Swift, and make it public. That's also how Android does it. Unfortunately, that's not trivial.
@@ -15,6 +15,7 @@ | |||
|
|||
### Improvements | |||
|
|||
- Add native SDK information in the replay option event (#4663) |
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.
- 🚫 The changelog entry seems to be part of an already released section
## 8.43.0
.
Consider moving the entry to the## Unreleased
section, please.
📜 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