Skip to main content

What you will learn

  • How to set up your environment
  • How to your application using the infrastack.ai SDK or the official OpenTelemetry SDK

Prerequisites

  • An infrastack.ai account to get your API key
  • An Express.js application

Follow the example project on GitHub

Getting started

You can use the Infrastack SDK to instrument your Express.js application with a single line of code.
1

Install the NPM package

2

Prepare your environment

Export your API key as an environment variable.
Or you can set the environment variables in your .env file by using the dotenv library.
3

Create instrumentation.ts

instrumentation.ts
If you don’t provide a service name, we will create a random name for you.
4

Build and run your application

Run your Express.js application with the node required command.
After creating some traffic, you can check your data from the infrastack.ai dashboard.

Next steps

Javascript SDK Reference

Explore the Express.js example project