Skip to content

Latest commit

 

History

History
90 lines (66 loc) · 5.16 KB

File metadata and controls

90 lines (66 loc) · 5.16 KB

Telemetry integration for LaunchDarkly browser SDKs.

⛔️⛔️⛔️⛔️

Warning

This is an alpha version. The API is not stabilized and will introduce breaking changes.

NPM Actions Status Documentation NPM NPM

LaunchDarkly overview

LaunchDarkly is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. Get started using LaunchDarkly today!

Twitter Follow

Compatibility

This package is compatible with the launchdarkly-js-client-sdk version 3.4.0 and later.

Setup

For error metric collection only

import { initialize } from "launchdarkly-js-client-sdk";
import { initTelemetry, register } from "@launchdarkly/browser-telemetry";

// Initialize the telemetry as early as possible in your application.
// Errors will be missed if they occur before the telemetry is initialized.
// For metrics only, breadcrumbs and stack traces are not required.
initTelemetry({breadcrumbs: false, stack: false});

// Initialize the LaunchDarkly client.
const client = initialize('sdk-key', context);

// Register the client with the telemetry instance.
register(client);

For error monitoring + metric collection

import { initialize } from "launchdarkly-js-client-sdk";
import { initTelemetry, register, inspectors } from "@launchdarkly/browser-telemetry";

// Initialize the telemetry as early as possible in your application.
// Errors will be missed if they occur before the telemetry is initialized.
initTelemetry();

// Initialize the LaunchDarkly client.
const client = initialize('sdk-key', context, {
  // Inspectors allows the telemetry SDK to capture feature flag information.
  inspectors: inspectors(),
});

// Register the client with the telemetry instance.
register(client);

Contributing

We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this SDK.

About LaunchDarkly

  • LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
    • Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
    • Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
    • Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
    • Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan).
    • Disable parts of your application to facilitate maintenance, without taking everything offline.
  • LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out our documentation for a complete list.
  • Explore LaunchDarkly