Affected: All SDKs
Symptoms
Users may notice that only one exposure is recorded in their experimentation iteration results, even though the same context has evaluated the flag multiple times. This may cause confusion when comparing experimentation results with the feature flag evaluation display, which shows all evaluations.
Cause
LaunchDarkly’s experimentation tracks exposures based on the unique context kind and key pair. This means:
- Each unique context (identified by its kind and key) is counted only once per experiment.
- Repeated evaluations with the same context object do not increase the exposure count.
- This is different from the flag evaluation display, which logs every evaluation regardless of whether the context is unique or not.
Solution
To ensure exposures are tracked as expected:
-
Verify unique contexts: Ensure that your application is sending different context keys if you expect multiple exposures.
-
Check your evaluation logic: If you are evaluating the experimentation flag repeatedly using the same context, the exposure count will remain at one.
-
Use the feature flag evaluation chart for debugging: If you need to track all flag evaluations (not just unique exposures), refer to the flag evaluation chart instead of experimentation results.
-
Test with varied contexts: Try sending different context keys and observe if additional exposures are registered.
-
Review Experiment Configuration: Ensure that the experiment is set up correctly and is tracking the expected contexts.
-
Evaluation Reason: Use evaluation reason to ensure you are seeing the context being evaluated receives
inExperiment: true