getsentry / getsentry/sentry-dotnet

Consider adding isolated scopes - requesting feedback

Open
#4,484 1 comment 1 reaction 0 assignees View on GitHub
.NET Feature
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.