Skip to content
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: Start/Stop session replay #4414

Merged
merged 11 commits into from
Oct 11, 2024
Merged

feat: Start/Stop session replay #4414

merged 11 commits into from
Oct 11, 2024

Conversation

brustolin
Copy link
Contributor

📜 Description

Added Api to manually control session replay start and stop

💚 How did you test it?

Unit tests

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

Copy link

github-actions bot commented Oct 8, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 6a7ed71

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 92.45283% with 8 lines in your changes missing coverage. Please review.

Project coverage is 91.315%. Comparing base (0a23401) to head (6a7ed71).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
Sources/Sentry/SentryReplayApi.m 70.000% 6 Missing ⚠️
Sources/Sentry/SentrySessionReplayIntegration.m 93.750% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4414       +/-   ##
=============================================
+ Coverage   91.293%   91.315%   +0.022%     
=============================================
  Files          610       610               
  Lines        49616     49696       +80     
  Branches     17876     17909       +33     
=============================================
+ Hits         45296     45380       +84     
+ Misses        4229      4224        -5     
- Partials        91        92        +1     
Files with missing lines Coverage Δ
Sources/Sentry/SentryOptions.m 99.251% <ø> (ø)
...tegrations/SessionReplay/SentrySessionReplay.swift 93.373% <ø> (ø)
Sources/Swift/Tools/SentryViewPhotographer.swift 92.592% <100.000%> (+0.592%) ⬆️
Sources/Swift/Tools/UIRedactBuilder.swift 92.537% <100.000%> (+0.113%) ⬆️
...onReplay/SentrySessionReplayIntegrationTests.swift 98.823% <100.000%> (+0.187%) ⬆️
...ests/SentryTests/SentryViewPhotographerTests.swift 99.285% <100.000%> (+0.054%) ⬆️
Sources/Sentry/SentrySessionReplayIntegration.m 85.375% <93.750%> (+0.438%) ⬆️
Sources/Sentry/SentryReplayApi.m 66.666% <70.000%> (+41.666%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a23401...6a7ed71. Read the comment docs.

Copy link

github-actions bot commented Oct 8, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1216.20 ms 1233.19 ms 17.00 ms
Size 21.58 KiB 705.97 KiB 684.39 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
be2977c 1202.51 ms 1221.32 ms 18.81 ms
ec879f7 1218.12 ms 1236.08 ms 17.96 ms
7cd187e 1229.02 ms 1233.06 ms 4.04 ms
5783680 1223.63 ms 1243.60 ms 19.97 ms
913fab7 1226.24 ms 1252.94 ms 26.70 ms
4d68229 1233.50 ms 1262.92 ms 29.42 ms
e9fa2b0 1226.22 ms 1248.47 ms 22.24 ms
39b1c35 1244.71 ms 1248.60 ms 3.89 ms
ca91a5c 1234.53 ms 1249.86 ms 15.33 ms
5b3518e 1242.27 ms 1257.81 ms 15.55 ms

App size

Revision Plain With Sentry Diff
be2977c 22.85 KiB 407.67 KiB 384.83 KiB
ec879f7 21.58 KiB 669.68 KiB 648.10 KiB
7cd187e 20.76 KiB 401.65 KiB 380.89 KiB
5783680 21.58 KiB 714.18 KiB 692.60 KiB
913fab7 21.58 KiB 703.60 KiB 682.02 KiB
4d68229 20.76 KiB 432.34 KiB 411.58 KiB
e9fa2b0 21.58 KiB 629.61 KiB 608.03 KiB
39b1c35 22.85 KiB 408.88 KiB 386.03 KiB
ca91a5c 22.84 KiB 403.19 KiB 380.34 KiB
5b3518e 21.58 KiB 612.11 KiB 590.53 KiB

Previous results on branch: feat/SR-Start-Stop

Startup times

Revision Plain With Sentry Diff
1529984 1229.36 ms 1247.45 ms 18.09 ms
814655e 1230.51 ms 1243.13 ms 12.61 ms

App size

Revision Plain With Sentry Diff
1529984 21.58 KiB 730.64 KiB 709.06 KiB
814655e 21.58 KiB 705.77 KiB 684.19 KiB

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused with the install integration if it's nil approach.

CHANGELOG.md Outdated Show resolved Hide resolved
Sources/Sentry/SentryReplayApi.m Show resolved Hide resolved
Sources/Sentry/SentryReplayApi.m Outdated Show resolved Hide resolved
Sources/Sentry/SentryReplayApi.m Outdated Show resolved Hide resolved
Sources/Sentry/SentrySessionReplayIntegration.m Outdated Show resolved Hide resolved
Sources/Sentry/SentrySessionReplayIntegration.m Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Sources/Sentry/SentryReplayApi.m Outdated Show resolved Hide resolved
Sources/Sentry/SentryReplayApi.m Show resolved Hide resolved
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, maybe we miss some tests, but that's not blocking.

Sources/Sentry/SentryReplayApi.m Show resolved Hide resolved
Sources/Sentry/SentryReplayApi.m Show resolved Hide resolved
Improved Performance for SwiftUI session replay
@brustolin brustolin enabled auto-merge (squash) October 11, 2024 06:59
@brustolin brustolin merged commit 2d35ccb into main Oct 11, 2024
65 checks passed
@brustolin brustolin deleted the feat/SR-Start-Stop branch October 11, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants