fix(llmobs): honor Feature Flags configuration source for prompts - #19809
Conversation
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 0a886b7 | Docs | View more details | Give us feedback! |
Dependency direction analysis
|
BenchmarksBenchmark execution time: 2026-08-21 11:05:22 Comparing candidate commit b8f2c9f in PR branch Found 0 performance improvements and 9 performance regressions! Performance is the same for 613 metrics, 10 unstable metrics.
|
Circular import analysis
|
Codeowners resolved asResolved from the full PR diff against No remaining files require a CODEOWNERS review. |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
KowalskiThomas
left a comment
There was a problem hiding this comment.
Please accept the suggestion if it makes sense. Otherwise LGTM.
|
/merge |
|
View all feedbacks in Devflow UI.
It will be processed automatically as soon as GitHub reports it as mergeable. View in MergeQueue UI.
alexandre.choura@datadoghq.com unqueued this merge request |
|
/code blockers |
|
View all feedbacks in Devflow UI.
Checking merge blockers for #19809...
No merge blockers detected. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
Description
Problem
PromptManager._fetch_from_ff()uses the now-deprecatedDD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLEDvalue as a separate activation gate and then enables Remote Configuration unconditionally.That became incorrect when #19331 introduced
agentless,remote_config, anddisabledas the authoritative resolved sources, defaulting toagentless.PromptManagerwas never updated to follow that resolved decision. Consequently, stableagentlessandremote_configconfigurations can silently use/resolve. Prompt retrieval still works, but the local Feature Flag exposure needed for experiment attribution is lost.The required lifecycle is:
disabledagentless_ensure_ffe_provider()onlyremote_config_ensure_ffe_rc()and_ensure_ffe_provider()Just as a quick reminder:
_ensure_ffe_provider()is essential asPromptManagerevaluates against the privatedatadog-llmobs-promptsOpenFeature domain; Without it, the SDK uses its no-op provider or potentially an unrelated application provider._ensure_ffe_rc()is necessary only forremote_config, as removing would effectively make local RC prompt evaluation supported only underddtrace-run, an unintended compatibility break.What changes
Prompt-backed Feature Flags now honor the existing resolved Feature Flagging configuration source.
disabledretains the existing HTTP/resolvefallback.remote_configlazily enables the existing Remote Configuration path.agentlessandremote_configregister and use the existingDataDogProviderfor local evaluation.Testing
Added a regression test
Risks
Low. The change only replaces the obsolete Prompt Manager activation gate with the already-resolved Feature Flagging source and preserves the HTTP fallback.
Additional Notes
I also had to add move resolver/constants to
openfeature.pysince the detect_layering_violation would otherwise fail as I'm using them in LLMObs's code and i couldn't find a way to elegantly work around that without adding code there. It's simply moving code around.