This product is not supported for your selected
Datadog site. (
).
Overview
The evaluation tester lets you simulate how a feature flag would evaluate for a given targeting key and set of attributes, without calling your application’s SDK. Use it to answer questions like, “Which variant would this user see?” or “Why didn’t this targeting rule match?” before you roll out a change.
Evaluations run through the evaluation tester are a dry run. They do not emit exposure events, do not count toward evaluation metrics or graphs, and do not affect experiment statistics.
Open the evaluation tester
- Navigate to Feature Flags and select a flag.
- Select the tab for the environment you want to test against, for example, Production or Staging.
- On the Targeting rules card, click Test Rule Evaluation to open the Evaluation tester side panel.
Provide a targeting context
The evaluation tester evaluates your flag’s targeting rules against a targeting context: a targeting key and, optionally, a set of attributes.
- Targeting key (required): The identifier used for deterministic bucketing (for example, a user ID). Changing the targeting key can change which variant is assigned when a rule uses percentage-based traffic splitting.
- Attributes (optional): Values used to evaluate the filters on your targeting rules, such as
country, email, or tier. Learn more on Targeting Attributes.
You can provide values for the targeting key and attributes in two ways:
- Form: Datadog generates an input field for the targeting key and each attribute referenced by the targeting rules in the selected environment. Each attribute field lists the rules that reference it. If no targeting rules in the environment reference any attributes, the form only shows the targeting key.
- JSON: Enter a raw JSON object of a targeting key and attributes. Use JSON mode when you need to test non-string attribute values, such as numbers, Booleans, arrays, or nested objects.
The evaluation result updates automatically as you edit the targeting key or attributes.
Understand the result
The Result section shows the variant that would be assigned for the provided targeting context, along with the name of the targeting rule that matched.
Expand How did I get this result? to see a rule-by-rule breakdown of the evaluation:
- Rules are listed in the order they are evaluated.
- Each rule shows whether it matched, was passed through (that is, the subject didn’t match the rule’s filter, so evaluation continued to the next rule), or was skipped (that is, it was unreachable given the result of a prior rule).
- For rules with a filter, the breakdown explains which condition matched or didn’t match (for example,
country matched US or browser did not match is one of Chrome, Safari).
The matched rule is also highlighted on the Targeting rules canvas, so you can see the evaluation path visually.
Testing a disabled flag
If the flag is disabled in the selected environment, the evaluation tester shows what a subject would receive if the flag were enabled, rather than returning the coded default. A warning banner reminds you that your application receives the coded default value while the flag remains disabled. Client SDKs always resolve to the coded default for disabled flags; only server SDKs evaluate targeting rules for disabled flags.
Further reading
Additional helpful documentation, links, and articles: