Beginning a transaction
To start a transaction, make use of thebeginTransaction() function. When using this function, Atatus will start to time the duration of the transaction.
Syntax
Parameter
Example
Ending a transaction
To know if a transaction currently running has successfully completed, use theendTransaction() function. The transaction time will be recorded and reported to Atatus.
Syntax
Example
Failing a transaction
ThefailTransaction() function will notify Atatus on the failure of any transaction. The time at which the transaction fails will be recorded and reported to Atatus.
Syntax
Example
You can either call
endTransaction() or failTransaction() to record a transaction. Both the functions cannot be used together.Recording a transaction with duration
To record a transaction with a time duration (ms), therecordTransaction() function is used. This function is useful when you do not begin or end a transaction.