getsentry / getsentry/sentry-dotnet
Consider adding isolated scopes - requesting feedback
- Dominant language
- C#
- Stars
- 770
- Forks
- 248
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 49
Description
> [!IMPORTANT]
> Not sure if we want/need to do this yet - depends if there's enough demand from the community. Add a thumbs up or something here if you really really want this!
### Description
From [this discord thread](https://discord.com/channels/621778831602221064/1410312909313020035/1410312909313020035), the SDK user is looking for a way to "Push" a scope with some tags etc. that only get applied to events captured in a certain context (e.g. the code to handle a particular button press).
This currently isn't possible in Global Mode (which we recommend for Desktop/Mobile apps) because it doesn't allow you to push new scopes:
https://github.com/getsentry/sentry-dotnet/blob/6e50eaa87b3aa24a921824c4494566b01f0640f0/src/Sentry/Internal/SentryScopeManager.cs#L75-L79
One solution would be to add something like Isolated scopes (which we have in the JS SDK) that could be created in GlobalMode.
Contributor guide
Assessment
This issue has not been assessed yet.