Skip to content

Commit a86c11c

Browse files
Update includes/platforms/configuration/options/thread-locality.mdx
Co-authored-by: Liza Mock <[email protected]>
1 parent f4a5808 commit a86c11c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

includes/platforms/configuration/options/thread-locality.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
<Alert>
22

3-
If you are curious about how thread locality works for scope data, in .NET, there
4-
are two modes for managing "ambient data". Usuaully Sentry will automatically choose the
5-
most appropriate mode for your application type, however this can be overridden by
6-
setting [`SentryOptions.IsGlobalModeEnabled`](../../configuration/options/#is-global-mode-enabled) manually.
3+
Read on if you're curious to know how thread locality works for scope data. In .NET, there
4+
are two modes for managing ambient data (which is data that's available in different parts of an application and doesn't need to be passed explicitly through method arguments): a disabled global mode and an enabled global mode. Usually, Sentry will automatically choose the most appropriate mode for your application type. However, this can be overridden by setting [`SentryOptions.IsGlobalModeEnabled`](../../configuration/options/#is-global-mode-enabled) manually.
75

86
If global mode is disabled (appropriate for most server-based applications), the
9-
ambient scope data is stored as an `AsyncLocal` and so it will flow with the execution
7+
ambient scope data will be stored as an `AsyncLocal` and will flow with the execution
108
context. Stephen Toub's blog post on [ExecutionContext vs SynchronizationContext](https://devblogs.microsoft.com/pfxteam/executioncontext-vs-synchronizationcontext/)
119
explains that concept in more detail.
1210

13-
If global mode is enabled (appropriate for desktop applications), ambient scope data is
11+
If global mode is enabled (appropriate for desktop applications), ambient scope data will be
1412
stored as a Singleton and available globally. This means you can set context (such as
1513
the user logged into the application) once and it will be sent with all events, regardless
1614
of whether the event was captured on the UI thread or a background thread.

0 commit comments

Comments
 (0)