Skip to content

feat: Scope sync attachments#5038

Open
bitsandfoxes wants to merge 13 commits intomainfrom
feat/scope-sync-attachments
Open

feat: Scope sync attachments#5038
bitsandfoxes wants to merge 13 commits intomainfrom
feat/scope-sync-attachments

Conversation

@bitsandfoxes
Copy link
Contributor

@bitsandfoxes bitsandfoxes commented Mar 18, 2026

Relates to getsentry/sentry-native#1584 and getsentry/sentry-java#5211

Allows syncing attachments to native layers. This will require a followup to implement the actual Android/iOS scope sync but unblocks Unity SDK.

#skip-changelog

@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@bitsandfoxes bitsandfoxes marked this pull request as draft March 18, 2026 16:25
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@bitsandfoxes bitsandfoxes force-pushed the feat/scope-sync-attachments branch from c6cc055 to 2f13317 Compare March 19, 2026 12:24
Co-authored-by: sentry-warden[bot] <258096371+sentry-warden[bot]@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 52.17391% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.02%. Comparing base (248f455) to head (aa0b353).
⚠️ Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
src/Sentry/Internal/ScopeObserver.cs 0.00% 8 Missing ⚠️
src/Sentry/Platforms/Native/NativeScopeObserver.cs 0.00% 2 Missing ⚠️
src/Sentry/Scope.cs 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5038      +/-   ##
==========================================
+ Coverage   73.94%   74.02%   +0.08%     
==========================================
  Files         497      499       +2     
  Lines       17974    18065      +91     
  Branches     3517     3518       +1     
==========================================
+ Hits        13291    13373      +82     
- Misses       3825     3834       +9     
  Partials      858      858              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

{
other.AddAttachment(attachment);
// Set the attachment directly to avoid triggering a scope sync
other._attachments.Add(attachment);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pushing and popping the scope does not get propagated to the native layer. So syncing the same attachments again doesn't make sense.

@bitsandfoxes bitsandfoxes marked this pull request as ready for review March 20, 2026 11:29
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.

1 participant