Thank you for trying out our new AppSignal for Node.js version 3 release. This release is powered by OpenTelemetry instrumentation. Please try it out and let us know if you run into any issues.
Follow these steps to install AppSignal for Node.js in your new app:
- Run "npm install --save @appsignal/nodejs@beta" in your app root directory to install the AppSignal beta.
- Create the "appsignal.ts/cjs" file to initialize the AppSignal client and export it. See this example appsignal.cjs file and appsignal.ts file.
- Add "--require ./appsignal.cjs" to the command to run your Node.js app. See an example in this package.json script for a JavaScript app and this example for a TypeScript app.
Most instrumentations are set up automatically and it will work out of the box. See the "additional instrumentation" section for next steps.
If you currently have a AppSignal for Node.js using version 2 and want to upgrade, follow these steps:
- Remove all the AppSignal packages from your "package.json" file.
- Run "npm install --save @appsignal/nodejs@beta" in your app root directory to install the AppSignal beta.
- Create the "appsignal.ts/cjs" file to initialize the AppSignal client and export it. See this example appsignal.cjs file and appsignal.ts file.
- Add "--require ./appsignal.cjs" to the command to run your Node.js app. See an example in this package.json script for a JavaScript app and this example for a TypeScript app.
- If you have custom instrumentation, remove all the related AppSignal code. Check if the code you're instrumenting is now automatically instrumented with the new package version. If not, follow OpenTelemetry tracing docs to add custom instrumentation it.
- Custom metrics, minutely probes, CLI tools and other features will continue to work as before.
See the "additional instrumentation" section for next steps.
For Express error reporting, an error reporting middleware is required. See these examples app for more information:
- JavaScript app:
- TypeScript app:
If you find any issues, please contact us at [email protected] with the following information:
- The AppSignal for Node.js package version you're using.
- A diagnose report.
- The error or a description of the problem you're experiencing.
- Any code examples that may be relevant to the issue.
- Not all libraries are supported at this time with instrumentation. If there is a gap it will show up as "unknown" events on incidents and the event timeline. Please report these unknown events.
- Our documentation website has not been updated to include more information about this new version. We are working on it!