Affected: All SDKs
Overview
Unknown flag variations occur when the fallback value you provide to the SDK’s variation() call is not one of the flag’s configured variations.
The fallback value is the result your application uses when the SDK cannot make a connection to LaunchDarkly and there is no cached value available. The SDK requires you to specify this fallback.
If a flag has true and false variations, but the fallback is set to none, LaunchDarkly records the evaluation as a blank variation. In the dashboard, this appears with no name.
Example:
Solution
To prevent unknown variations, configure your fallback to be one of the valid variations defined in the flag. This ensures that even if evaluation fails, for example, due to your application not connecting to LaunchDarkly, the fallback is still tracked as a known variation.
Here is an example using the JavaScript SDK: client.variation('flag-key-123abc', false); . In this case, false is a valid variation defined on the flag. This groups all evaluations under recognized variations.