start_transaction
function is used to start a new transaction.
For supported frameworks, Atatus Ruby agent will automatically capture the transactions.
This function can be used to instrument unsupported frameworks or background operations.
Compatibility
- Rails 4.2 and above.
- Sinatra 1.0 and above.
Syntax
copy
Atatus.start_transaction('Name')
Parameter | Type | Description |
---|---|---|
name | String (Required) | Transaction name. |
Example
Example for sample custom transaction
copy
def handle_request
Atatus.start_transaction("Name");
# TODO: your operations
Atatus.end_transaction();
end