Skip to content

Instantly share code, notes, and snippets.

@tombruijn
Last active October 12, 2022 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tombruijn/35be5d4a37d0e9aa0ba380f15ad3d0d4 to your computer and use it in GitHub Desktop.
Save tombruijn/35be5d4a37d0e9aa0ba380f15ad3d0d4 to your computer and use it in GitHub Desktop.
AppSignal for Node.js version 3 beta install instructions

Node.js OpenTelemetry install instructions

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.

New installation

Follow these steps to install AppSignal for Node.js in your new app:

Most instrumentations are set up automatically and it will work out of the box. See the "additional instrumentation" section for next steps.

Upgrading

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.

Additional instrumentation

For Express error reporting, an error reporting middleware is required. See these examples app for more information:

Notes

If you find any issues, please contact us at support@appsignal.com 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.

Known issues

  • 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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment