Skip to content

Commit f4a5808

Browse files
Alex KrawiecAlex Krawiec
authored andcommitted
Turn repeated thread locality content into an include
1 parent 79f9f97 commit f4a5808

File tree

4 files changed

+21
-54
lines changed

4 files changed

+21
-54
lines changed

docs/platforms/dotnet/common/enriching-events/scopes/index.mdx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,7 @@ other hand are more user facing. You can call <PlatformIdentifier name="configur
3434
time to modify data stored on the scope. This is useful for doing things like
3535
[modifying the context](../context/).
3636

37-
<Alert>
38-
39-
If you are very curious about how thread locality works for scope data, in .NET there
40-
are two modes for managing "ambient data". Usuaully Sentry will automatically choose the
41-
most appropriate mode for your application type. However this can be overridden by
42-
setting [`SentryOptions.IsGlobalModeEnabled`](../../configuration/options/#is-global-mode-enabled) manually.
43-
44-
If global mode is disabled (appropriate for most server based applications), the
45-
ambient scope data is stored as an `AsyncLocal` and so it will flow with the execution
46-
context. Stephen Toub's blog post on [ExecutionContext vs SynchronizationContext](https://devblogs.microsoft.com/pfxteam/executioncontext-vs-synchronizationcontext/)
47-
explains that concept in more detail.
48-
49-
If global mode is enabled (appropriate for desktop applications), ambient scope data is
50-
stored as a Singleton and available globally. This means you can set context (such as
51-
the user logged into the application) once and it will be sent with all events, regardless
52-
of whether the event was captured on the UI thread or a background thread.
53-
54-
</Alert>
37+
<Include name="platforms/configuration/options/thread-locality.mdx" />
5538

5639
When you call a global function such as <PlatformIdentifier name="capture-event" /> internally Sentry
5740
discovers the current hub and asks it to capture an event. Internally the hub will

docs/platforms/powershell/enriching-events/scopes/index.mdx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,7 @@ other hand are more user facing. You can call <PlatformIdentifier name="configur
3434
time to modify data stored on the scope. This is useful for doing things like
3535
[modifying the context](../context/).
3636

37-
<Alert>
38-
39-
If you are very curious about how thread locality works for scope data, in .NET there
40-
are two modes for managing "ambient data". Usuaully Sentry will automatically choose the
41-
most appropriate mode for your application type. However this can be overridden by
42-
setting [`SentryOptions.IsGlobalModeEnabled`](../../configuration/options/#is-global-mode-enabled) manually.
43-
44-
If global mode is disabled (appropriate for most server based applications), the
45-
ambient scope data is stored as an `AsyncLocal` and so it will flow with the execution
46-
context. Stephen Toub's blog post on [ExecutionContext vs SynchronizationContext](https://devblogs.microsoft.com/pfxteam/executioncontext-vs-synchronizationcontext/)
47-
explains that concept in more detail.
48-
49-
If global mode is enabled (appropriate for desktop applications), ambient scope data is
50-
stored as a Singleton and available globally. This means you can set context (such as
51-
the user logged into the application) once and it will be sent with all events, regardless
52-
of whether the event was captured on the UI thread or a background thread.
53-
54-
</Alert>
37+
<Include name="platforms/configuration/options/thread-locality.mdx" />
5538

5639
When you call a global function such as <PlatformIdentifier name="capture-event" /> internally Sentry
5740
discovers the current hub and asks it to capture an event. Internally the hub will

docs/platforms/unity/enriching-events/scopes/index.mdx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,7 @@ other hand are more user facing. You can call <PlatformIdentifier name="configur
3434
time to modify data stored on the scope. This is useful for doing things like
3535
[modifying the context](../context/).
3636

37-
<Alert>
38-
39-
If you are very curious about how thread locality works for scope data, in .NET there
40-
are two modes for managing "ambient data". Usuaully Sentry will automatically choose the
41-
most appropriate mode for your application type. However this can be overridden by
42-
setting [`SentryOptions.IsGlobalModeEnabled`](../../configuration/options/#is-global-mode-enabled) manually.
43-
44-
If global mode is disabled (appropriate for most server based applications), the
45-
ambient scope data is stored as an `AsyncLocal` and so it will flow with the execution
46-
context. Stephen Toub's blog post on [ExecutionContext vs SynchronizationContext](https://devblogs.microsoft.com/pfxteam/executioncontext-vs-synchronizationcontext/)
47-
explains that concept in more detail.
48-
49-
If global mode is enabled (appropriate for desktop applications), ambient scope data is
50-
stored as a Singleton and available globally. This means you can set context (such as
51-
the user logged into the application) once and it will be sent with all events, regardless
52-
of whether the event was captured on the UI thread or a background thread.
53-
54-
</Alert>
37+
<Include name="platforms/configuration/options/thread-locality.mdx" />
5538

5639
When you call a global function such as <PlatformIdentifier name="capture-event" /> internally Sentry
5740
discovers the current hub and asks it to capture an event. Internally the hub will
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Alert>
2+
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.
7+
8+
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
10+
context. Stephen Toub's blog post on [ExecutionContext vs SynchronizationContext](https://devblogs.microsoft.com/pfxteam/executioncontext-vs-synchronizationcontext/)
11+
explains that concept in more detail.
12+
13+
If global mode is enabled (appropriate for desktop applications), ambient scope data is
14+
stored as a Singleton and available globally. This means you can set context (such as
15+
the user logged into the application) once and it will be sent with all events, regardless
16+
of whether the event was captured on the UI thread or a background thread.
17+
18+
</Alert>

0 commit comments

Comments
 (0)