Skip to content
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

dotnet: clarify global mode transaction state #12919

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/platforms/dotnet/common/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ Example scenarios where it should be explicitly set to true:

Defaults to `false`, unless in Blazor WASM, MAUI, Unity, or Xamarin where the default is `true`.

In server applications, when Global Mode is **disabled**, data stored in the scope is only available in the context of the particular request in which it is created.
When Global Mode is **disabled** data stored in the scope is set on the current [ExecutionContext](https://learn.microsoft.com/en-us/dotnet/api/system.threading.executioncontext).
In server applications data stored in the scope is only available in the context of the particular request in which it is created.
Broadly, the ExecutionContext passes to child tasks and threads, but not to parent tasks and threads.

For UI applications (like MAUI) when Global mode is **enabled**, a single scope stack is shared by the whole application.
When Global Mode is **enabled**, a single scope stack is shared by the whole application.

Since version 5.0.0 the transaction is always set on the current ExecutionContext, regardless of the Global Mode.

See the <PlatformLink to="/enriching-events/scopes/">Scopes and Hubs documentation</PlatformLink> for more information.

Expand Down