Skip to content

Add native local scope for Windows/Linux #928

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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

tustanivsky
Copy link
Collaborator

@tustanivsky tustanivsky commented May 26, 2025

This PR adopts the local scope implementation changes for sentry-native discussed in getsentry/sentry-native#1226.

Instead of applying scope data to each outgoing event via the before_send handler, the SDK now uses a write-only sentry_scope_t instance which is then passed to the new sentry_capture_event_with_scope function. Also, with this approach global scope can be modified directly via native's API (tags, level, etc.) which addresses the issue with missing context values for fast-fail crashes.

Breaking changes:

  • Dist and Environment properties are now set during the SDK initialization via options, no more corresponding set/get functions in Scope class.
  • Since Hub & Scope refactoring docs suggest deprecating ConfigureScope function and it'll become no-op after switching to native's local scopes anyway it was removed for USentrySubsystem.

Note: adding breadcrumbs via sentry_add_breadcrumb to global scope unblocks further work on getsentry/sentry-native#1166 as custom handling for the corresponding event in Unreal plugin is no longer required.

Copy link
Contributor

github-actions bot commented May 26, 2025

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

Generated by 🚫 dangerJS against 5eee756

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