Skip to content

Feature Flags

Experimental

This is an experimental feature and the APIs are subject to change.

Feature flags allow you to signal to Bitdrift which feature flags a given user was exposed to. This will be important because your feature flags will affect how your app behaves.

See the Product > Issues Feature Guide to learn more about how to see feature flags in the product.

Kotlin
import io.bitdrift.capture.Capture.Logger

// Call this at the time of exposure (not assignment)
Logger.setFeatureFlagExposure("my-flag", "my-variant")
Logger.setFeatureFlagExposure("my-no-variant-flag")
Java
import io.bitdrift.capture.Capture.Logger;

// Call this at the time of exposure (not assignment)
Logger.setFeatureFlagExposure("my-flag", "my-variant");
Logger.setFeatureFlagExposure("my-no-variant-flag", null);
Swift
import Capture

// Call this at the time of exposure (not assignment)
Logger.setFeatureFlagExposure(withName: "my-flag", variant: "my-variant");
Logger.setFeatureFlagExposure(withName: "my-no-variant-flag", variant: nil);