Documentation Index
Fetch the complete documentation index at: https://statsig-4b2ff144-devin-1763168466-llm-docs-audit.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Migrating from LaunchDarkly to Statsig is a strategic move. It can lead to efficient feature flag management and a stronger experimentation culture. By following this guide, you’ll be well equipped to make the transition with confidence. We will cover the following topics in this guide:- Conceptual differences between LaunchDarkly and Statsig
- Deciding what to migrate vs. not
- Importing flags into Statsig
- Flipping evaluation from LaunchDarkly to Statsig
- How to run the migration process
Conceptual differences between LaunchDarkly and Statsig
It is important to understand a few fundamental differences in how LaunchDarkly and Statsig structure their feature management data models: Environment: LaunchDarkly treats environments as top level concept where flags and segments must be duplicated and managed separately across environments. In Statsig, we have a centralized model where flags/configs handle environment-specific logic in their targeting rules. Flag types: LaunchDarkly uses a mix of boolean, multivariate, and JSON flags. Statsig distinguishes between Feature Flags (boolean) and Dynamic Configs (typed multivariate configs with JSON values). Targeting: LaunchDarkly relies on Contexts to evaluate flags. Statsig evaluates based on what we call a StatsigUser object.Side by side comparison
| LaunchDarkly concept | Can we migrate? | Statsig notes |
|---|---|---|
| Project | ✅ Yes | Convert to Project |
| Environment | ✅ Yes | Convert to Environment (mark critical as production in Statsig) |
| Boolean Flags | ✅ Yes | Convert to Feature Flags |
| String, Number, and JSON Flags | ✅ Yes | Convert to Dynamic Configs |
| Segments | ✅ Yes | Convert to Segments (Big ID list segments won’t be imported) |
| Targeting Rules | ✅ Yes | Convert to Rules |
| Context kind | ✅ Yes | Convert to Custom Unit ID in Statsig |
| Context attribute | ✅ Yes | Convert to Custom Fields in Statsig |
| Flag owner, tags, teams, and history | ❌ No | Statsig does not preserve any metadata or historical versions of a flag during migration |
User Context mapping example
LaunchDarkly supports multi-kind, structured user contexts. Statsig requires a user object to achieve this. In Statsig, User ID or Custom ID is equivalent to LD’s key. Known top-level fields in Statsig include userID, email, ip, userAgent, and custom. All other fields go under the custom object. Example 1: LD User context to Statsig User object conversion- Remove LaunchDarkly fallback from the wrapper - Update the wrapper functions to rely solely on Statsig. This simplifies the logic and ensures LaunchDarkly is no longer queried in production.
-
Delete LD initialization logic and SDK imports - Any references to
LDClient.initializeorldClient.variationcan now be safely removed.
How to run the migration process
To ensure a safe and manageable transition to Statsig, we recommend a phased rollout that each team can adopt independently. This approach allows for gradual migration, scoped validation, and shared learnings across the org.| Phase | Description | Who | Duration |
|---|---|---|---|
| 1. Auditing existing flags in LaunchDarkly | Each team reviews their LaunchDarkly flags and identifies which flags are worth migrating | Individual Teams | Ongoing (2-3 days per team) |
| 2. Start creating all new flags in Statsig | Starting immediately, all new flags to be created in Statsig to avoid using legacy system out of habit | Org-wide | 1 week |
| 3. Pilot migration with one team | Select one team to migrate a small set of LaunchDarkly flags to Statsig using the wrapper. Validate that migrated flags work as expected | Pilot team | 1–2 weeks |
| 4. Org-Wide migration and cutover | Repeat migration for more teams in waves. Create training docs and guides for org wide adoption. Once Statsig is stable and adopted org-wide, remove LaunchDarkly fallback from wrapper | All teams + central guidance | 3–4 weeks (rolling) |