Skip to content

Send EXPOSURE and EVALUATION feature flag features to Datadog - #12797

Draft
danyal002 wants to merge 2 commits into
danyal.khan/EX-3815-exposure-hookfrom
danyal.khan/EX-3828
Draft

danyal002 wants to merge 2 commits into
danyal.khan/EX-3815-exposure-hookfrom
danyal.khan/EX-3828

Conversation

@danyal002

@danyal002 danyal002 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Warning

NOT READY FOR REVIEW YET

Stacked on #12775.

What Does This Do

  • Routes UFC split features to each destination they list:
    • HOOK: __dd_feature.<key> in the flag metadata, as before.
    • EXPOSURE: __dd_exposure_feature.<key>, which ExposureLoggingHook puts on the exposure event as features.
    • EVALUATION: __dd_evaluation_feature.<key>, which FlagEvalLoggingHook puts on the flag-evaluation event.
  • A feature with several destinations is written once for each of them.
  • Adds a features field, with new constructors, to ExposureEvent and FlagEvalEvent. The existing constructors still work.
  • Flag-evaluation buckets now include the features, in both tiers. Evaluations with different features in one flush window give separate rows; evaluations with the same features merge as before. Each row serializes its features.

Motivation

Flag configurations can attach features to a split, for example a bandit policy ID, and send them with exposures and flag evaluations. This lets new features reach Datadog without an SDK release.

Additional Notes

  • Evaluation features are sent whatever the observeFullEvaluationData consent, because they come from the flag configuration, not the evaluation context.
  • Flushing is unchanged. Features only split a window's rows when they differ inside it.
  • Exposures and rows without features are byte-identical to today.
  • With an older dd-java-agent, the provider checks for the new constructors and sends events without features.
  • The intake schemas must accept features before any flag configuration uses these destinations: ddoghq/dd-source#124673.

Jira ticket: EX-3828

@danyal002 danyal002 added type: feature Enhancements and improvements comp: openfeature OpenFeature labels Oct 8, 2026
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 78.57%
• Overall Coverage: 59.33% (+0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9a89416 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.74 s 14.52 s [+0.9%; +2.2%] (maybe worse)
startup:insecure-bank:tracing:Agent 13.61 s 13.61 s [-1.0%; +1.0%] (no difference)
startup:petclinic:appsec:Agent 17.70 s 17.60 s [-0.2%; +1.4%] (no difference)
startup:petclinic:iast:Agent 17.40 s 17.53 s [-1.3%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 17.09 s 17.31 s [-2.3%; -0.3%] (maybe better)
startup:petclinic:sca:Agent 17.66 s 17.55 s [-0.4%; +1.7%] (no difference)
startup:petclinic:tracing:Agent 16.18 s 16.60 s [-6.8%; +1.7%] (no difference)

Commit: 9a89416f · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

A UFC split feature can list the EXPOSURE and EVALUATION destinations.
The evaluator now writes each feature once for each destination it
lists, under that destination's metadata prefix. The exposure hook puts
EXPOSURE features on the exposure event, and the flag-evaluation hook
puts EVALUATION features on the flag-evaluation event, whatever the
consent, because they come from the flag configuration.

Flag-evaluation buckets now include the features in both tiers, so rows
with different features never merge, and each row serializes them. Both
events gain a features field with new constructors; with an older agent
the provider sends them without features.
@danyal002
danyal002 force-pushed the danyal.khan/EX-3815-exposure-hook branch from 296c989 to 272a12d Compare October 8, 2026 19:03
@danyal002
danyal002 force-pushed the danyal.khan/EX-3828 branch from 112f76f to 5fc2740 Compare October 8, 2026 19:03
The FFE_FLAGS schema documents that keys are unique within a split and
that SDKs keep the first feature with a repeated key. Flag metadata is a
map, so the provider used to keep the last one. It now ignores a later
feature with a key it has already seen, for every destination.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: openfeature OpenFeature type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant