atatus_set_transaction_name() function is used to set a name for a new transaction.
Compatibility
Compatible with all PHP agent versions.
Syntax
copy
atatus_set_transaction_name($transaction_name)
Parameter
| Parameter | Type | Description |
|---|---|---|
| $transaction_name | String (Required) | Transaction name. |
Example
In the following example, we begin a new transaction after ending a transaction. You will have to set a transaction name for the new transaction.
copy
<?php
function example() {
if (extension_loaded('atatus')) { // ensure PHP agent is available
atatus_set_transaction_name("custom_transaction_name");
}
// your code here
}
+1-415-800-4104