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

ref: Make SentrySDK.replay.start() thread safe #4455

Merged
merged 6 commits into from
Oct 18, 2024

Conversation

brustolin
Copy link
Contributor

📜 Description

Making SentrySDK.replay.start() thread safe to avoid multiple initialization

💚 How did you test it?

📝 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.

🔮 Next steps

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

Sources/Sentry/SentryReplayApi.m Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.355%. Comparing base (b695b61) to head (cf3cc29).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4455       +/-   ##
=============================================
+ Coverage   91.342%   91.355%   +0.013%     
=============================================
  Files          610       610               
  Lines        49944     49950        +6     
  Branches     18043     18043               
=============================================
+ Hits         45620     45632       +12     
+ Misses        4233      4227        -6     
  Partials        91        91               
Files with missing lines Coverage Δ
Sources/Sentry/SentryReplayApi.m 72.413% <100.000%> (+5.747%) ⬆️

... and 6 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 b695b61...cf3cc29. Read the comment docs.

Copy link

github-actions bot commented Oct 17, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1214.88 ms 1235.63 ms 20.76 ms
Size 21.90 KiB 707.64 KiB 685.74 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8838e54 1234.71 ms 1246.46 ms 11.75 ms
1ac58a6 1232.07 ms 1254.69 ms 22.63 ms
0d32275 1245.80 ms 1267.80 ms 22.00 ms
42ef6ba 1191.51 ms 1214.08 ms 22.57 ms
cd3bfeb 1226.61 ms 1226.96 ms 0.35 ms
10f96ae 1216.27 ms 1239.65 ms 23.38 ms
c021422 1199.15 ms 1222.20 ms 23.05 ms
98a8c16 1206.40 ms 1232.14 ms 25.74 ms
706c41f 1231.00 ms 1248.52 ms 17.52 ms
f25febb 1238.80 ms 1245.35 ms 6.56 ms

App size

Revision Plain With Sentry Diff
8838e54 22.85 KiB 413.44 KiB 390.59 KiB
1ac58a6 21.58 KiB 626.07 KiB 604.49 KiB
0d32275 22.84 KiB 403.14 KiB 380.29 KiB
42ef6ba 21.58 KiB 417.86 KiB 396.28 KiB
cd3bfeb 20.76 KiB 425.77 KiB 405.01 KiB
10f96ae 21.58 KiB 682.02 KiB 660.44 KiB
c021422 20.76 KiB 435.64 KiB 414.88 KiB
98a8c16 20.76 KiB 431.00 KiB 410.24 KiB
706c41f 21.58 KiB 699.25 KiB 677.67 KiB
f25febb 21.58 KiB 414.92 KiB 393.34 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.

Thanks, LGTM.

@brustolin brustolin merged commit 65e48e0 into main Oct 18, 2024
70 checks passed
@brustolin brustolin deleted the ref/prevent-replaystart-misuse branch October 18, 2024 12:47
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