Fastify
AppSignal for Node.jsThis feature requires version 3.0.0 or higher.
FastifyThis feature requires version 3.0.0 or higher.
The AppSignal for Node.js integration for Fastify.
Installation
Fastify is automatically instrumented by the AppSignal for Node.js package.
To initialize the AppSignal client, you should require the appsignal.cjs
file before your application starts loading.
When calling fastify start
directly, you can use the NODE_OPTIONS
environment variable to require it:
bash
NODE_OPTIONS='--require ./appsignal.cjs' fastify start [...]
The start script references the appsignal.cjs
file that was created when configuring AppSignal.
Features
The Fastify integration will send AppSignal a child span representing the execution time of each component used during a web request.
The integration will use the request route as the name of the action. Query params and request body are set as span attributes.
Errors are automatically tracked.