Affected: All SDKs
Symptoms
-
A flag removed from the codebase is still showing evaluations.
Cause
-
If this flag is not using a JS-based SDK: A
variation
call with the explicit name of the flag is being called. -
If this flag is using a JS-based SDK: The JS SDK (and JS-based SDKs, such as React versions 2.26 and earlier) is making an
allFlags
call (oruseFlags
hook in React SDK) to get flag values for all flags available to client-side SDKs in the specified environment. TheallFlags
method will send a feature event to LD. This would be the equivalent of callingvariation
for every flag.
Solution
For non-JS-based SDKs:
- Search the flag name in any non-main codebase in testing or isolated machines.
For JS-based SDKs:
-
Make the flag unavailable to client-side SDKs in the flag Settings tab.
-
Configure
sendEventsOnlyForVariation
totrue
in the client-side SDK. When this option is set totrue
, analytics events will only be sent whenvariation
is called. To configure this option, reference sendEventsOnlyForVariation. -
If there are still evaluations, search for the flag name in any non-main codebase.
-