This repository houses the JavaScript SDKs for LaunchDarkly Observability. This repo contains the code for our supported JavaScript environments, providing tools for session replay and observability.
Caution
This library is an alpha version and should not be considered ready for production use while this message is visible.
# npm
npm i @launchdarkly/observability
# yarn
yarn add @launchdarkly/observability
Update your web app entrypoint:
import { initialize } from 'launchdarkly-js-client-sdk'
import Observability, { LDObserve } from '@launchdarkly/observability'
const client = init3(
'<CLIENT_SIDE_ID>',
{ key: '[email protected]' },
{
// Not including plugins at all would be equivalent to the current LaunchDarkly SDK.
plugins: [
new Observability({
networkRecording: {
enabled: true,
recordHeadersAndBody: true,
},
}),
],
},
)
Caution
This library is an alpha version and should not be considered ready for production use while this message is visible.
# npm
npm i @launchdarkly/session-replay
# yarn
yarn add @launchdarkly/session-replay
Update your web app entrypoint:
import { initialize } from 'launchdarkly-js-client-sdk'
import SessionReplay, { LDRecord } from '@launchdarkly/session-replay'
const client = init3(
'<CLIENT_SIDE_ID>',
{ key: '[email protected]' },
{
// Not including plugins at all would be equivalent to the current LaunchDarkly SDK.
plugins: [
new SessionReplay({
serviceName: 'example-svc',
}), // Could be omitted for customers who cannot use session replay.
],
},
)
Refer to the SDK documentation for instructions on getting started with using the SDK.
LaunchDarkly uses the SLSA framework (Supply-chain Levels for Software Artifacts) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published SDK packages. To learn more, see the provenance guide (PROVENANCE.md).
- LaunchDarkly Observability provides a way to collect and send errors, logs, traces to LaunchDarkly. Correlate latency or exceptions with your releases to safely ship code.
- LaunchDarkly Session Replay provides a way to capture user sessions on your application to replay them in LaunchDarkly. Understand how users are interacting with your site and with new features you ship.
- 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. Read our documentation for a complete list.
- Explore LaunchDarkly
- launchdarkly.com for more information
- docs.launchdarkly.com for our documentation and SDK reference guides
- apidocs.launchdarkly.com for our API documentation
- blog.launchdarkly.com for the latest product updates
We welcome PRs and issues on this repo. Please don't hesitate to file a ticket if there is anything we can do to help!