Skip to content

Conversation

@pranjal-jately-ld
Copy link
Contributor

@pranjal-jately-ld pranjal-jately-ld commented Nov 30, 2025

Add observability and Session Replay integration to the toolbar's internal LaunchDarkly client. Session Replay is controlled via a feature flag.

Description

This PR adds Session Replay capabilities to the Developer Toolbar, enabling observability.

What does this PR do?

Integrates LaunchDarkly's Session Replay plugin into the toolbar's internal client, controlled by a feature flag. Session Replay runs only in the toolbar's internal LaunchDarkly client context and uses the 'default' privacy setting.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation (changes to documentation only)
  • 🔧 Refactor (code change that neither fixes a bug nor adds a feature)
  • 🎨 Style (formatting, missing semicolons, etc; no production code change)
  • Performance (code change that improves performance)
  • Test (adding missing tests, refactoring tests; no production code change)
  • 🔨 Chore (updating grunt tasks, build process, etc; no production code change)

Screenshots/Videos



Related Jira issue: REL-10964: Add Session Replay capabilities to the Developer Toolbar

Add observability and Session Replay integration to the toolbar's
internal LaunchDarkly client. Session Replay is controlled via a
feature flag.
@launchdarkly-upra launchdarkly-upra bot changed the title feat: add Session Replay capabilities to Toolbar feat: [REL-10964] add Session Replay capabilities to Toolbar Nov 30, 2025
Copy link

@nieblara nieblara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things are looking cool here!

Comment on lines +119 to +135
// Add Session Replay plugin with manual start
observabilityPlugins: [
new SessionReplay({
manualStart: true,
privacySetting: 'default',
}),
],
}
: undefined;
: {
// Add Session Replay plugin with manual start
observabilityPlugins: [
new SessionReplay({
manualStart: true,
privacySetting: 'default',
}),
],
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, non blocking: we can simplify this so we dont have branching!

const sessionReplayPlugin = new SessionReplay({
  manualStart: true,
  privacySetting: 'default',
});

const options = {
  ...(baseUrl && { baseUrl }),
  ...(streamUrl && { streamUrl }),
  ...(eventsUrl && { eventsUrl }),
  observabilityPlugins: [sessionReplayPlugin],
};

checkAndUpdateSessionReplay();

// Listen for flag changes
const flagKey = 'toolbar-enable-session-replay';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could be a constant, i see this used in packages/toolbar/src/flags/toolbarFlags.ts

@nieblara
Copy link

nieblara commented Dec 2, 2025

the session replay lib might be too new for the version of the sdk we have right now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants