LightStep Documentation

Welcome to the LightStep developer hub. You'll find comprehensive guides and documentation to help you start working with LightStep as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Node.js Auto-Instrumentation

If your app is written in Node.js, you can get started quickly with LightStep. Download the Auto-Installer, then configure it to communicate with your LightStep Satellites. When you deploy your app, all supported libraries will begin sending trace data to LightStep.

These Auto-Installers are forked from Datadog's contribution of their tracers to the OpenTelemetry project. You can find the original Datadog docs here.

This library MUST be imported and initialized before any instrumented module. When using a transpiler, you MUST import and initialize the tracer library in an external file and then import that file as a whole when building your application. This prevents hoisting and ensures that the tracer library gets imported and initialized before importing any other instrumented module.

Supported Node Versions

Node >=8 is supported by this Auto-Installer. Only even versions like 8.x and 10.x are officially supported. Odd versions like 9.x and 11.x should work but are not officially supported.

Install the Auto-Installer

  1. Install the Node.js Auto-Installer, using npm.
npm install --save ls-trace
  1. Import and initialize the Auto-Installer.
// This line must come before importing any instrumented module.
const tracer = require('ls-trace').init()
// server.js
import "./tracer"; // must come before importing any instrumented module.

// tracer.js
import tracer from "ls-trace";
tracer.init(); // initialized in a different file to avoid hoisting.
export default tracer;

Set B3 Headers for Trace Propagation

LightStep recommends using B3 headers for trace propagation as the default, especially on hybrid deployments, as it is the most widely supported header at this time.

const tracer = require('ls-trace').init(
	  experimental: {
		  b3: true

Configure the Auto-Installer to Send Data to LightStep

To send data from your system to LightStep, you need to configure the Auto-Installer to:

  • Point to your Satellites
  • Send global tags required by LightStep to ingest and display the data to you.

To configure the Auto-Installer:
Configure the Auto-Installer to point to the LightStep Satellites by setting these environment variables. Use the right values, depending on if you are using on-premise, LightStep public, or Developer Mode Satellites.

DD_TRACE_AGENT_URL=https://<Satellite host>:<Satellite port>

Where to find the host and port values for on-premise?

This is your pool address, found in your configuration file.

When setting the environment variable DD_TRACE_GLOBAL_TAGS, the following variables must be included:

  • service_name:
    The name of the service from which spans originate.
    This tag allows LightStep to accurately report on your services, with features such as the Service diagram and the Service Directory
  • access_token:
    The access token for the project the tracers report to.
    LightStep Satellites need this token to accept and store span data from the tracer. Reports from clients with invalid or deactivated access tokens will be rejected on ingress.

What's Auto-Instrumented

The following auto-instrumentation libraries are supported:


ModuleVersionsSupport TypeNotes
connect>=2Fully Supported
express>=4Fully SupportedSupports Sails, Loopback, and more
fastify>=1Fully Supported
graphql>=0.10Fully SupportedSupports Apollo Server and express-graphql
hapi>=2Fully Supported
koa>=2Fully Supported
paperplane>=2.3Fully SupportedNot supported in serverless-mode
restify>=3Fully Supported

Native Modules

ModuleSupport Type
dnsFully Supported
httpFully Supported
httpsFully Supported
netFully Supported

Data Stores

ModuleVersionsSupport TypeNotes
cassandra-driver>=3Fully Supported
elasticsearch>=10Fully SupportedSupports @elastic/elasticsearch versions >=5
ioredis>=2Fully Supported
knex>=0.8Fully SupportedThis integration is only for context propagation
memcached>=2.2Fully Supported
mongodb-core>=2Fully SupportedSupports Mongoose
mysql>=2Fully Supported
mysql2>=1Fully Supported
pg>=4Fully SupportedSupports pg-native when used with pg
redis>=0.12Fully Supported
tedious>=1Fully SupportedSQL Server driver for mssql and sequelize


ModuleVersionsSupport TypeNotes
amqp10>=3Fully SupportedSupports AMQP 1.0 brokers (i.e. ActiveMQ, Apache Qpid)
amqplib>=0.5Fully SupportedSupports AMQP 0.9 brokers (i.e. RabbitMQ, Apache Qpid)
generic-pool>=2Fully Supported
kafka-nodeComing Soon
rheaComing Soon

Promise Libraries

ModuleVersionsSupport Type
bluebird>=2Fully Supported
promise>=7Fully Supported
promise-js>=0.0.3Fully Supported
q>=1Fully Supported
when>=3Fully Supported


ModuleVersionsSupport Type
bunyan>=1Fully Supported
paperplane>=2.3.2Fully Supported
pino>=2Fully Supported
winston>=1Fully Supported

Updated about a month ago

Node.js Auto-Instrumentation

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.