Skip to main content
Make sure to install the AppSignal collector before proceeding with these instructions.

Install the OpenTelemetry packages

Use npm to add the OpenTelemetry SDK and the OTLP exporter to your application’s dependencies:
The @opentelemetry/auto-instrumentations-node package will automatically instrument most applications and libraries. Check out the package’s README for a list of libraries and frameworks that it instruments. You can find additional instrumentations for libraries and frameworks in the OpenTelemetry Registry.

Configure OpenTelemetry in your application

Add this opentelemetry.cjs file to your application with the OpenTelemetry exporter and AppSignal configuration. Make sure to update the values below with your AppSignal application name, environment and push API key, and to replace the exporter endpoint with the address of your AppSignal collector if needed.

Start your application with OpenTelemetry

To run your application with OpenTelemetry, you need to use the --require flag to load the opentelemetry.cjs file before starting your application:
Update your package.json file to add --require to the command that starts your app.
You can also use the --require flag with tools such as ts-node and nodemon. When using a wrapper CLI, such as nest start or fastify start, to start your application, use the NODE_OPTIONS environment variable to pass the flag to the Node.js runtime:

Test the app!

Now that all the components are connected, start your app with the required command line arguments and test if you see data arrive in AppSignal. Check the “Errors > Issue list” and “Performance > Traces” page specifically. If after following our installation instructions you still don’t see data in AppSignal, let us know and we’ll help you finalize your OpenTelemetry installation!