For supported frameworks, Atatus .NET agent automatically captures transactions. Use StartTransaction() or CaptureTransaction() to instrument unsupported frameworks or background operations.

Required Imports

1. StartTransaction

Use StartTransaction() to create a custom transaction. You must call End() to complete the transaction.

Syntax

Parameter

Example

2. CaptureTransaction

Use CaptureTransaction() to create a transaction with automatic lifecycle management. The transaction ends automatically when the callback completes.

Syntax

Parameter

Example

3. CurrentTransaction

Use CurrentTransaction to access the active transaction within the current execution context.

Syntax

Example

See also