Target Inspector
The Target Inspector lets you debug targeting rules by simulating how a specific user evaluates against a flag. Enter a user key and attributes, and see exactly which rules match — and why.
What It Does
When a user reports "I'm not seeing the new feature" or "I should have access but I don't," the Target Inspector is your first stop for debugging. Instead of reading through targeting rules and mentally computing the result, you can:
- Enter the user's key and attributes
- See which targeting rules evaluated to true or false
- Understand why a specific variation was (or wasn't) served
- Verify that percentage rollouts are assigning users correctly
- Check that prerequisite flags are satisfied
Using the Target Inspector
To use the Target Inspector, open any flag's detail page and click the Inspecttab. You'll see:
- User Input Form — Enter the user key and any custom attributes (e.g., email, country, subscription tier, beta status).
- Rule Evaluation — Each targeting rule is displayed with its match result: matched or no match. The first matching rule determines the variation served.
- Final Result— The variation that would be served to this user, along with the reason (e.g., "Matched rule: Beta Users" or "Default rule applied").
Understanding Rule Evaluation
FlagEngine evaluates targeting rules top-to-bottom. The first rule that matches determines the served variation. If no rule matches, the flag's default state (ON/OFF or default value) is used.
The Target Inspector shows you this evaluation step by step:
Rule 1: Beta Users (segment)
Condition: User is in segment "beta-testers"
User key "user-456" is a member of segment "beta-testers" — match!
Rule 2: Internal Employees
Condition: email ends with "@company.com"
User email "user@example.com" does not end with "@company.com" — no match.
Rule 3: 10% Gradual Rollout
Condition: hash(userKey) % 100 < 10
Hash value 73 is not in the 0-9 range — user is in the 90% holdout group.
In this example, the first rule matches, so the user gets the variation defined by the "Beta Users" rule. The remaining rules are skipped.
Common Debugging Scenarios
User should be in a segment but isn't
Use the Target Inspector to verify the user's attributes match the segment definition. Segments are evaluated based on the attributes you pass at evaluation time — check that your application is sending the correct attribute values.
Percentage rollout isn't reaching the user
Percentage rollouts use hash-based assignment for consistency. The same user key will always map to the same bucket. The Target Inspector shows the hash value and which bucket the user falls into, so you can confirm whether they're in the rollout group.
Prerequisite flag is blocking the feature
If a flag has prerequisites, the Target Inspector checks them first. If a prerequisite evaluates to OFF, the main flag defaults to OFF regardless of its own rules. The inspector shows prerequisite results explicitly.
Wrong environment being evaluated
The Target Inspector uses the currently selected environment tab. Make sure you're inspecting the correct environment — targeting rules can differ between dev, staging, and production.
Tips for Effective Debugging
- Use real user data — Copy the exact user key and attributes from your production logs for the most accurate debugging.
- Check environment first— Ensure you're inspecting the correct environment tab before investigating targeting rules.
- Verify attribute names — Attribute names are case-sensitive.
emailandEmailare different attributes. - Check for overriding rules — A rule higher in the list might be matching unexpectedly and preventing lower rules from being evaluated.
Next Steps
- Target Comparison— compare how two different users evaluate for the same flag
- Targeting & Segments— learn how targeting rules and segments work