For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/feature_flags/concepts/variants_and_flag_types.md. A documentation index is available at /llms.txt.

Variants and Flag Types

This product is not supported for your selected Datadog site. ().

Overview

Each feature flag has a variant type that defines the data type of values the flag can return. Variants are the specific values your application can receive when it evaluates the flag.

Flag types

Datadog Feature Flags support five data types:

TypeDescription
Booleantrue or false
StringText values
IntegerWhole numbers
NumberFloating-point numbers
JSONStructured JSON objects

Note: The flag key and variant type cannot be changed after you create the flag.

Add a variant

  1. Navigate to your feature flag’s details page.
  2. Open the Manage Implementation & Variants side panel.
  3. Click Add Variant.
  4. Enter the variant name and value, then save.

Note: You cannot add variants to Boolean flags. Boolean flags are limited to true and false.

Edit a variant

  1. Navigate to your feature flag’s details page.
  2. Open the Manage Implementation & Variants side panel.
  3. Click the pencil icon next to the variant you want to modify.
  4. Update the variant’s name, value, or both, then save.
Changing the value of a variant that is being served as part of a running experiment may invalidate the results of that experiment.

Further reading

Additional helpful documentation, links, and articles: