By default, if you do not set a name for your current transaction, the route name of the transaction will be used. If you wish to set a customized name, you can do so by setting the transaction name.

Compatibility

Compatible with all Node.js agent versions

Syntax

atatus.setTransactionName(transaction_name)

Parameter

Parameter Type Description
transaction_name String (Required) Transaction name.

Example

In the following example statements, GET/api/users, users is the customized transaction name.

copy
icon/buttons/copy
import atatus from "atatus-nodejs";

atatus.setTransactionName("GET /api/users");

See also