exd telemetry contexts
Context-attribute presence and value distribution for a flag.
Synopsis
exd telemetry contexts --flag <key>
[--namespace <slug>] [--environment <env>]
[--since <duration> | --from <ts> --to <ts>]
[--source <uri>]...
[--format human|json]
[--limit <n>]
[--fail-on-error]
See common flags for shared options.
Description
For each attribute the flag's predicates touch, reports:
- Presence rate — fraction of records where the attribute was set.
- Top-N values — most-common observed values (subject to truncation rules in the capabilities manifest; private attributes never appear here).
- Missing-value count — records where the attribute was absent.
Useful for spotting "we declared a predicate on user.tier but the SDK never sends it" — the predicate's atoms silently evaluate to "not matched" and the rule never fires.
Use cases
-
Diagnose a never-firing rule.
rulesreportsT005;contextsreveals which input attribute is missing:exd telemetry contexts --flag onboarding-banner --since 7d -
Pre-deploy SDK readiness check. Before adding a new predicate on
user.subscription_tier, confirm the SDK already populates it:exd telemetry contexts --flag onboarding-banner --since 24h -
Find typos. A predicate on
user.contry(typo forcountry) isis_not_set100% of the time — clear signal of a name mismatch. -
Audit value cardinality. Top-N distinct values for
user.countryshould be a short list of country codes; thousands of distinct values is a sign of malformed input.
Subcommand-specific flags
| Flag | Required | Notes |
|---|---|---|
--flag <key> | yes | The flag whose context attributes to analyze. |
Result fields (--format json)
result.attributes is an array:
| Field | Type | Notes |
|---|---|---|
name | string | Dotted attribute name. |
presence_rate | float | 0.0 – 1.0. |
present_count | integer | Records where the attribute was set. |
missing_count | integer | Records where the attribute was absent. |
top_values | array | [{value, count}], truncated. |
top_values_truncated_at | integer or null | The cardinality cap applied. |
Diagnostics
T006context attribute always missing (presence_rate == 0.0for an attribute referenced by the flag's predicates)
Example
$ exd telemetry contexts --flag onboarding-banner --since 7d
Context attributes for 'onboarding-banner' (last 7d, n=1,388,210)
attribute presence_rate top values (count, %)
user.id 100.0% (high cardinality — 1.3M distinct)
user.country 99.4% US (834,210, 60.1%) DE (152,001, 11.0%) FR (94,332, 6.8%) ...
user.tier 87.2% free (901,221, 64.9%) pro (188,442, 13.6%) enterprise (21,300, 1.5%)
user.subscription 0.0% ← T006
T006 warning: 'user.subscription' is referenced by rule[2] but never populated.
Either the SDK isn't sending the attribute, or the predicate name is wrong.
Exit codes
See telemetry exit codes.
See also
rules— per-rule fire counts;contextsis the natural drill-down forT005.exd schema— the declared attribute shape (what the flag expects).T006.