The setSkip function helps you exclude specific API requests (such as health-related requests) from being sent to Atatus.
Compatibility
Requires Node.js agent version 2.0.0 or higher.
Syntax
atatus.setSkip(fn)
Parameter
| Parameter | Type | Description |
|---|---|---|
| fn | Function (Required) | Skip any requests from being monitored in transactions |
Example
copy
import atatus from "atatus-nodejs";
atatus.setSkip((event) => {
// Skip certain transactions
if (event.name === 'GET /health' || event.name === 'POST /cron/report') {
return true;
}
return false;
});
+1-415-800-4104