Lightstep supports OpenTelemetry to get telemetry data (traces, logs, and metrics) from your app as requests travel through its many services and other infrastructure.

OpenTelemetry provides a single set of APIs, libraries, and instrumentation resources to capture distributed traces and metrics from your applications. Lightstep provides Launchers that install OpenTelemetry and capture telemetry from popular libraries and frameworks already installed in your system, with only one line of code needed. Our Launchers automate your instrumentation efforts to give you the power of Lightstep in under five minutes.

When you add (or have) a call from your service to or LaunchDarkly, the plugin automatically generates a span that captures the request.

If you’ve never instrumented for observability, read Understand Distributed Tracing for some background knowledge.

Configure OpenTelemetry

To report data to Lightstep Observability, you’ll need:

To configure OpenTelemetry, set environment variables with the name of the service that you’d like to report tracing data from and the Lightstep Observability access token.

This Learning Path uses the Public Microsatellites. You can also use a Developer Satellite or if your organization already has them, your On-Premise Microsatellites.

Start tabs

Public Microsatellites


End code tabs

Install OpenTelemetry instrumentation

Install the Lightstep OpenTelemetry launcher for Node.js. Lightstep’s launcher packages all of the necessary OpenTelemetry dependencies with a configuration layer to ease setup.

  1. In a shell, run: $ npm install lightstep-opentelemetry-launcher-node --save

  2. In your service’s code, add the following.

Start tabs


const { lightstep, opentelemetry } = require("lightstep-opentelemetry-launcher-node");
lightstep.configureOpenTelemetry().start().then(() => {
  // All of your application code and any imports that should
  // leverage OpenTelemetry instrumentation must go here; e.g.,
  // const express = require('express');

End code tabs

Add a call to or LaunchDarkly

If you don’t already have one, add a call from your Node.js service to or LaunchDarkly.

Here’s an example that queries for a feature flag using the Javascript SDK.

const flagVal = splitClient.getTreatment(customerId, 'test-flag');

What did we learn?

  • Lightstep has Launchers for OpenTelemetry that let you instrument your service with a single line of code.