Skip to main content
LaunchDarkly feature flags target teams that already standardize on LaunchDarkly for rollout control and user targeting.

Why

LaunchDarkly provides mature targeting, audit trails, and SDK ergonomics for larger teams. Refract keeps that power behind the same FeatureFlagTool contract used by PostHog and LOCAL providers.

Setup

  1. Add tooling-feature-flags-launch-darkly to apps/backend/package.json.
  2. Run make deps-install.
  3. Configure the environment:
  1. Set LAUNCHDARKLY_SDK_KEY in the deployment environment.

Evaluation context

LaunchDarkly contexts are built from FeatureFlagContext:
  • userId → context key (defaults to anonymous)
  • organizationId, environment, and attributes → context attributes

Gotchas

  • The SDK initializes during buildFeatureFlags() — allow a few seconds on cold start.
  • String flag values surface as variant with enabled: true.
  • Use cacheMs to reduce SDK chatter; request caching still applies per HTTP request.

What’s next?