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: Crash in hasUnfinishedChildSpansToWaitFor #3821

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

philipphofmann
Copy link
Member

📜 Description

Fix a crash in SentryTracer hasUnfinishedChildSpansToWaitFor by not setting the shouldIgnoreWaitForChildrenCallback to nil when finishing the tracer.

💡 Motivation and Context

Fixes GH-3781

💚 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

Fix a crash in SentryTracer hasUnfinishedChildSpansToWaitFor by not
setting the shouldIgnoreWaitForChildrenCallback to nil when finishing
the tracer.

Fixes GH-3781
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.854%. Comparing base (1ee3d54) to head (7e37fc8).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3821       +/-   ##
=============================================
- Coverage   90.877%   90.854%   -0.024%     
=============================================
  Files          559       559               
  Lines        44054     44074       +20     
  Branches     15701     15689       -12     
=============================================
+ Hits         40035     40043        +8     
- Misses        3949      3961       +12     
  Partials        70        70               
Files Coverage Δ
Sources/Sentry/SentryTracer.m 97.374% <ø> (+0.462%) ⬆️
...ts/SentryTests/Transaction/SentryTracerTests.swift 98.339% <100.000%> (+0.042%) ⬆️

... and 8 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 1ee3d54...7e37fc8. Read the comment docs.

Copy link

github-actions bot commented Apr 3, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1222.82 ms 1237.29 ms 14.47 ms
Size 21.58 KiB 571.74 KiB 550.16 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e0f077c 1224.65 ms 1243.52 ms 18.87 ms
e998fd0 1254.41 ms 1272.78 ms 18.37 ms
ecd9ecd 1214.16 ms 1232.59 ms 18.43 ms
9e6665f 1237.58 ms 1253.84 ms 16.26 ms
20163bb 1248.92 ms 1258.48 ms 9.56 ms
645f63f 1231.33 ms 1247.51 ms 16.18 ms
efb0147 1245.26 ms 1266.94 ms 21.68 ms
a6ac3d2 1219.00 ms 1231.32 ms 12.32 ms
39b1c35 1209.73 ms 1232.40 ms 22.67 ms
11ccc16 1203.82 ms 1237.06 ms 33.24 ms

App size

Revision Plain With Sentry Diff
e0f077c 22.85 KiB 412.59 KiB 389.74 KiB
e998fd0 21.58 KiB 414.59 KiB 393.01 KiB
ecd9ecd 20.76 KiB 420.23 KiB 399.47 KiB
9e6665f 22.84 KiB 403.52 KiB 380.67 KiB
20163bb 20.76 KiB 426.82 KiB 406.06 KiB
645f63f 21.58 KiB 572.91 KiB 551.33 KiB
efb0147 22.84 KiB 403.52 KiB 380.67 KiB
a6ac3d2 20.76 KiB 436.65 KiB 415.89 KiB
39b1c35 22.85 KiB 408.88 KiB 386.03 KiB
11ccc16 20.76 KiB 431.71 KiB 410.95 KiB

@philipphofmann philipphofmann merged commit 2384e6d into main Apr 3, 2024
66 of 70 checks passed
@philipphofmann philipphofmann deleted the fix/tracer-crash branch April 3, 2024 10:57
dKasabwala pushed a commit to dKasabwala/sentry-cocoa that referenced this pull request May 6, 2024
Fix a crash in SentryTracer hasUnfinishedChildSpansToWaitFor by not
setting the shouldIgnoreWaitForChildrenCallback to nil when finishing
the tracer.

Fixes getsentryGH-3781
threema-matteo pushed a commit to threema-ch/sentry-cocoa that referenced this pull request May 21, 2024
Fix a crash in SentryTracer hasUnfinishedChildSpansToWaitFor by not
setting the shouldIgnoreWaitForChildrenCallback to nil when finishing
the tracer.

Fixes getsentryGH-3781
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.

Crash in SentryTracer hasUnfinishedChildSpansToWaitFor
2 participants