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

fix: Fix removing value from context not updating observer context #4960

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

philprime
Copy link
Contributor

@philprime philprime commented Mar 7, 2025

📜 Description

Replaces setExtras to setContext of scope observers when removing a value from scope.
Moves existing test from Objective-C to Swift.

💡 Motivation and Context

Fixes #2588

💚 How did you test it?

📝 Checklist

You have to check all boxes before merging:

  • 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.
  • I updated the wizard 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

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.395%. Comparing base (5ce992b) to head (9a05917).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4960       +/-   ##
=============================================
- Coverage   92.496%   92.395%   -0.101%     
=============================================
  Files          666       666               
  Lines        78924     78971       +47     
  Branches     28576     27725      -851     
=============================================
- Hits         73002     72966       -36     
- Misses        5824      5910       +86     
+ Partials        98        95        -3     
Files with missing lines Coverage Δ
Sources/Sentry/SentryScope.m 96.889% <100.000%> (ø)
Tests/SentryTests/SentryScopeSwiftTests.swift 99.133% <100.000%> (+0.077%) ⬆️
Tests/SentryTests/SentryScopeTests.m 96.739% <ø> (-0.291%) ⬇️

... and 26 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 5ce992b...9a05917. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

github-actions bot commented Mar 7, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1229.35 ms 1246.73 ms 17.37 ms
Size 22.30 KiB 823.37 KiB 801.06 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
b483671 1217.20 ms 1236.82 ms 19.62 ms
160a2a7 1219.29 ms 1240.96 ms 21.67 ms
005bb4c 1237.38 ms 1255.54 ms 18.16 ms
df50619 1226.11 ms 1244.92 ms 18.81 ms
a2af9fa 1236.29 ms 1251.67 ms 15.38 ms
1ab18c9 1223.94 ms 1237.32 ms 13.38 ms
ae9c51b 1267.73 ms 1272.33 ms 4.59 ms
b9fc537 1211.00 ms 1220.40 ms 9.40 ms
49819af 1263.92 ms 1275.66 ms 11.74 ms
e8f2cfd 1241.90 ms 1258.98 ms 17.08 ms

App size

Revision Plain With Sentry Diff
b483671 20.76 KiB 434.72 KiB 413.96 KiB
160a2a7 21.58 KiB 614.86 KiB 593.28 KiB
005bb4c 20.76 KiB 419.70 KiB 398.94 KiB
df50619 21.58 KiB 671.57 KiB 649.99 KiB
a2af9fa 20.76 KiB 432.88 KiB 412.11 KiB
1ab18c9 21.90 KiB 727.73 KiB 705.83 KiB
ae9c51b 22.85 KiB 411.13 KiB 388.28 KiB
b9fc537 21.58 KiB 676.19 KiB 654.61 KiB
49819af 20.76 KiB 427.31 KiB 406.55 KiB
e8f2cfd 22.31 KiB 756.67 KiB 734.37 KiB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

Scope removeContext and removeTag not working for app crash
1 participant