Transaction Monitoring

Transactions allow you to track key interactions or user flows in their app such as login, signup, checkout, upgrade, and in app purchase. You must add code to specify where a transaction starts and where a transaction ends.

Beginning a Transaction

The beginTransaction method denotes the start of a transaction. At this point, Atatus begins timing the duration of the transaction.

atatus.beginTransaction("key_transaction_name");

Instead of key_transaction_name, you can specify your key transaction name. e.g: Signup, Checkout

Ending a Transaction

The endTransaction method tells Atatus that the given transaction has successfully completed. At this point, the transaction time is recorded, and the transaction will be reported to Atatus.

atatus.endTransaction("key_transaction_name");
Failing a Transaction

The failTransaction method tells Atatus that the given transaction has failed. At this point, the transaction time is recorded, and the transaction will be reported to Atatus.

atatus.failTransaction("key_transaction_name");

You can call either endTransaction or failTransaction to record the transaction, but not the both.

Canceling a Transaction

The cancelTransaction method tells Atatus that the given transaction has canceled and will not be reported to Atatus. Canceled transactions are ignored.

atatus.cancelTransaction("key_transaction_name");

You have to call cancelTransaction instead of endTransaction or failTransaction to cancel the transaction.

Record a transaction with duration (ms)

The recordTransaction method is used to record a transaction with supplied duration. It is useful when you don't begin and end the transaction.

atatus.recordTransaction("key_transaction_name", 120);

Here 120 is the duration in milliseconds.

Document Sections