Skip to content

impr: Skip enriching scope when nil #4243

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

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

philipphofmann
Copy link
Member

📜 Description

Skip enriching the scope in the hub initializer when it is nil, as enrich scope expects a non nil scope.

💡 Motivation and Context

This came up while investigating flaky tests.

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

🔮 Next steps

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
philipphofmann Philipp Hofmann
Skip enriching the scope in the hub initializer when it is nil, as
enrich scope expects a non nil scope.
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.480%. Comparing base (2911760) to head (8af0bf6).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4243       +/-   ##
=============================================
+ Coverage   91.473%   91.480%   +0.006%     
=============================================
  Files          612       612               
  Lines        49341     49355       +14     
  Branches     17843     17848        +5     
=============================================
+ Hits         45134     45150       +16     
+ Misses        4115      4112        -3     
- Partials        92        93        +1     
Files Coverage Δ
Sources/Sentry/SentryHub.m 98.655% <100.000%> (+0.003%) ⬆️
Sources/Swift/Tools/UIRedactBuilder.swift 99.056% <100.000%> (ø)
...s/SentryTests/SentryCrash/TestSentryCrashWrapper.m 80.000% <100.000%> (+2.222%) ⬆️
Tests/SentryTests/SentryHubTests.swift 98.901% <100.000%> (+0.013%) ⬆️

... 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 2911760...8af0bf6. Read the comment docs.

@philipphofmann philipphofmann merged commit c42dfa3 into main Aug 7, 2024
65 of 67 checks passed
@philipphofmann philipphofmann deleted the impr/hub-skip-enrich-scope-when-nil branch August 7, 2024 09:18
Copy link
Contributor

github-actions bot commented Aug 7, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1238.76 ms 1261.38 ms 22.62 ms
Size 21.58 KiB 697.84 KiB 676.25 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
6bc31df 1202.52 ms 1215.86 ms 13.34 ms
6ad07ae 1240.76 ms 1242.98 ms 2.22 ms
8cd6cfa 1229.88 ms 1251.45 ms 21.57 ms
effc81c 1253.71 ms 1256.16 ms 2.45 ms
e70a2e1 1207.54 ms 1227.17 ms 19.63 ms
efb0147 1242.00 ms 1257.31 ms 15.31 ms
fb53d97 1235.00 ms 1241.88 ms 6.88 ms
881a955 1221.63 ms 1243.38 ms 21.75 ms
48e8c2e 1231.00 ms 1244.52 ms 13.52 ms
e84bc3f 1257.08 ms 1267.41 ms 10.33 ms

App size

Revision Plain With Sentry Diff
6bc31df 21.58 KiB 544.86 KiB 523.28 KiB
6ad07ae 20.76 KiB 424.69 KiB 403.93 KiB
8cd6cfa 21.58 KiB 571.85 KiB 550.26 KiB
effc81c 20.76 KiB 433.18 KiB 412.42 KiB
e70a2e1 21.58 KiB 655.73 KiB 634.15 KiB
efb0147 22.84 KiB 403.52 KiB 380.67 KiB
fb53d97 20.76 KiB 425.80 KiB 405.04 KiB
881a955 22.85 KiB 407.63 KiB 384.78 KiB
48e8c2e 21.58 KiB 418.44 KiB 396.86 KiB
e84bc3f 20.76 KiB 434.72 KiB 413.96 KiB

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.

None yet

2 participants