sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Send envelopes that cannot be cached to disk

Open denrase opened this issue 1 year ago β€’ 2 comments

:scroll: Description

Try to send envelopes that could not be saved to the disk cache.

:bulb: Motivation and Context

Relates to https://github.com/getsentry/team-mobile/issues/52

:green_heart: How did you test it?

  • Added unit test

:pencil: Checklist

You have to check all boxes before merging:

  • [x] I reviewed the submitted code.
  • [x] 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.
  • [x] No breaking change or entry added to the changelog.
  • [x] No breaking change for hybrid SDKs or communicated to hybrid SDKs.

:crystal_ball: Next steps

Check thread syncing.

denrase avatar Aug 21 '24 14:08 denrase

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

Generated by :no_entry_sign: dangerJS against 0b21b68b5a87ee422713f009e41dbb09af136dc0

github-actions[bot] avatar Aug 21 '24 14:08 github-actions[bot]

Performance metrics :rocket:

Β  Plain With Sentry Diff
Startup time 1239.53 ms 1254.43 ms 14.90 ms
Size 21.58 KiB 714.94 KiB 693.36 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
f4e0299cb4b5f416e8a75c1ce3df851d2012941f 1230.33 ms 1249.68 ms 19.35 ms
2a894d51fb421fc00c10b772395c816e4678ca8a 1202.07 ms 1227.66 ms 25.59 ms
9f0d9e0ce4c7650c21f95ebc0a2fc24b50255d55 1206.55 ms 1219.41 ms 12.86 ms
8cf5bca761564c2e8400150e4ee72f41ab5b2c2b 1212.35 ms 1223.90 ms 11.54 ms
3a31fc9c3d19b7028ffff9c57a714fa42fc19f13 1237.35 ms 1249.02 ms 11.67 ms
984eb2dde88ad76c80a9ff87a77cfd295a8f9f6d 1220.62 ms 1235.24 ms 14.62 ms
c471221c18dd94f8d4f6cd3f80cd1b7d472c3f05 1224.16 ms 1241.59 ms 17.43 ms
156e771327f21110f7da31575f74329fa52eb699 1228.06 ms 1242.64 ms 14.58 ms
de033daa1cfa7690b0644ba9292b69259d386266 1216.91 ms 1222.84 ms 5.92 ms
f1c36e0f5005d05a0793438dec330b7d7d0f3b7c 1215.18 ms 1223.62 ms 8.43 ms

App size

Revision Plain With Sentry Diff
f4e0299cb4b5f416e8a75c1ce3df851d2012941f 20.76 KiB 427.54 KiB 406.78 KiB
2a894d51fb421fc00c10b772395c816e4678ca8a 21.58 KiB 414.57 KiB 392.99 KiB
9f0d9e0ce4c7650c21f95ebc0a2fc24b50255d55 21.58 KiB 424.28 KiB 402.70 KiB
8cf5bca761564c2e8400150e4ee72f41ab5b2c2b 21.58 KiB 671.30 KiB 649.72 KiB
3a31fc9c3d19b7028ffff9c57a714fa42fc19f13 20.76 KiB 414.45 KiB 393.69 KiB
984eb2dde88ad76c80a9ff87a77cfd295a8f9f6d 20.76 KiB 425.77 KiB 405.01 KiB
c471221c18dd94f8d4f6cd3f80cd1b7d472c3f05 22.85 KiB 413.89 KiB 391.04 KiB
156e771327f21110f7da31575f74329fa52eb699 20.76 KiB 419.70 KiB 398.94 KiB
de033daa1cfa7690b0644ba9292b69259d386266 21.58 KiB 418.15 KiB 396.57 KiB
f1c36e0f5005d05a0793438dec330b7d7d0f3b7c 21.58 KiB 670.40 KiB 648.81 KiB

Previous results on branch: feat/send-envelope-on-cache-failure

Startup times

Revision Plain With Sentry Diff
cd071767d66e067789545b0bd203b770f0e95e66 1219.90 ms 1240.00 ms 20.10 ms
70a2a20274a200a04219cf74d792653c89de43ec 1250.63 ms 1266.24 ms 15.61 ms
d8edaa70f865cd6fd324b5710361d8e778d341f4 1231.65 ms 1257.69 ms 26.05 ms
0d828040a61f40c3e32b90583d957b7ba01c9436 1227.37 ms 1252.37 ms 25.01 ms

App size

Revision Plain With Sentry Diff
cd071767d66e067789545b0bd203b770f0e95e66 21.58 KiB 706.96 KiB 685.38 KiB
70a2a20274a200a04219cf74d792653c89de43ec 21.58 KiB 709.33 KiB 687.75 KiB
d8edaa70f865cd6fd324b5710361d8e778d341f4 21.58 KiB 714.88 KiB 693.30 KiB
0d828040a61f40c3e32b90583d957b7ba01c9436 21.58 KiB 714.79 KiB 693.21 KiB

github-actions[bot] avatar Aug 21 '24 15:08 github-actions[bot]

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • [ ] Sources/Sentry/SentryFileManager.m

github-actions[bot] avatar Sep 16 '24 13:09 github-actions[bot]

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • [ ] Sources/Sentry/SentryFileManager.m

github-actions[bot] avatar Sep 16 '24 13:09 github-actions[bot]

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • [ ] Sources/Sentry/SentryFileManager.m

github-actions[bot] avatar Sep 16 '24 13:09 github-actions[bot]

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • [ ] Sources/Sentry/SentryFileManager.m

github-actions[bot] avatar Sep 16 '24 14:09 github-actions[bot]

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • [ ] Sources/Sentry/SentryFileManager.m

github-actions[bot] avatar Sep 17 '24 10:09 github-actions[bot]

Codecov Report

Attention: Patch coverage is 99.24242% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.688%. Comparing base (394ad33) to head (0b21b68). Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
Sources/Sentry/SentryFileManager.m 0.000% 1 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              main     #4294    +/-   ##
==========================================
  Coverage   91.687%   91.688%            
==========================================
  Files          621       623     +2     
  Lines        50441     50627   +186     
  Branches     18177     18325   +148     
==========================================
+ Hits         46248     46419   +171     
- Misses        4100      4115    +15     
  Partials        93        93            
Files with missing lines Coverage Ξ”
SentryTestUtils/TestClient.swift 85.833% <100.000%> (+1.011%) :arrow_up:
Sources/Sentry/SentryHttpTransport.m 98.930% <100.000%> (+0.079%) :arrow_up:
Sources/Sentry/SentryNSURLRequestBuilder.m 100.000% <100.000%> (ΓΈ)
Sources/Sentry/SentrySpotlightTransport.m 97.142% <100.000%> (+11.848%) :arrow_up:
...tryTests/Networking/SentryHttpTransportTests.swift 99.708% <100.000%> (+0.005%) :arrow_up:
...ts/Networking/SentryNSURLRequestBuilderTests.swift 100.000% <100.000%> (ΓΈ)
...sts/Networking/SentrySpotlightTransportTests.swift 100.000% <100.000%> (ΓΈ)
...s/SentryTests/Networking/TestNSURLRequestBuilder.m 100.000% <100.000%> (ΓΈ)
Sources/Sentry/SentryFileManager.m 93.979% <0.000%> (-0.772%) :arrow_down:

... and 20 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 394ad33...0b21b68. Read the comment docs.

codecov[bot] avatar Sep 17 '24 10:09 codecov[bot]

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • [ ] Sources/Sentry/SentryFileManager.m

github-actions[bot] avatar Sep 19 '24 11:09 github-actions[bot]

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • [ ] Sources/Sentry/SentryFileManager.m

github-actions[bot] avatar Sep 20 '24 08:09 github-actions[bot]

@philipphofmann Implemented handling of the case where envelope to data fails. Waiting for CI so we can do a final review/feedback round.

denrase avatar Sep 20 '24 08:09 denrase

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • [ ] Sources/Sentry/SentryFileManager.m

github-actions[bot] avatar Sep 20 '24 09:09 github-actions[bot]

Thank you @denrase and thanks @brustolin for approving the PR.

philipphofmann avatar Sep 20 '24 12:09 philipphofmann