Feature flags are used in software to control the availability of a feature. For example, you might use a feature flag to provide new functionality to only a sub-set of users. When monitoring a release with a feature flag, or debugging issues in your app, it’s important to understand the state of any feature flags. That way, you can see if the introduction of the feature causes performance issues or know whether an error is the result of the new feature. If you find the feature is causing problems, you can immediately deactivate it.

When you’ve instrumented your services with OpenTelemetry, you can add attributes that hold metadata about feature flags and then see this data directly in Lightstep Observability when troubleshooting any issues.

We’ve built an experimental OpenTelemetry plugin that works with both Split.io and LaunchDarkly to automatically create feature flag attributes (feature flag name and customer ID) and then whenever a feature flag is called in the service, collect the values of those attributes and add them to the span.

When you view a trace in Lightstep Observability, if a span contains a call to a feature flag, the flag name and customer ID appear in the Attributes panel. Feature flag metadata

Follow along using our code sandbox!

Once you download and install the plugin, you need to register it with your tracer.

You’ll learn how to:

  • Quickly instrument your Node.js service using Lightstep’s OpenTelemetry Launcher.
  • Download, install, and register the plugin.
  • View feature flag data in Lightstep Observability’s Trace view.

Before you begin

You’ll need the following to complete this Learning Path:

  • A Lightstep Observability account. Lightstep offers a free Community account. If you don’t already have an account, you can sign up here.

    If you company already has an account, click Join an existing team in the Sign Up dialog.

  • A Node.js app.

    Looking for other language support for feature flags? Get in touch with us.

  • An account with either Split.io or LaunchDarkly