Skip to content

Port master Feature Flags changes to the dd-openfeature SDK - #12957

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits into
masterfrom
bbujon/ffe-sdk-updates
Oct 21, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits into
masterfrom
bbujon/ffe-sdk-updates

Conversation

@PerfectSlayer

@PerfectSlayer PerfectSlayer commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

What Does This Do

Brings master changes made to the old agent-coupled provider into the dd-openfeature SDK, and adds the SDK side of the shutdown flush:

Motivation

#12844 replaces the agent-coupled provider with the SDK. These changes landed on master in the old provider and agent modules meanwhile; without this port they would be lost when #12844 deletes those modules.

Additional Notes

Per-subject evaluation telemetry opt-out (port of #12884)
  • EvaluationTelemetryOptOutHook: same logic as master, wraps the metrics, flag evaluation logging and span enrichment hooks; exposures are unchanged.
  • Provider.Options.enableEvaluationTelemetryOptOutParameter(boolean), overriding DD_FEATURE_FLAGS_EVALUATION_TELEMETRY_PER_SUBJECT_OPT_OUT_ENABLED read through Settings.
  • Provider.Options now defaults to a 30 s init timeout, as on master.
  • EvaluationTelemetryOptOutTest ports master's 25 scenarios to the SDK test infrastructure. Environment variable cases are tested through system properties and SettingsTest, as Provider reads the real environment.
Send each batch once (SDK part of #12477)
  • DirectIntakeTransport no longer retries (master's direct intake is now send-once: no retries, no redirects).
  • FallbackTransport switches to direct intake for good on the first proxy failure, replaying the batch only after a definitive proxy rejection.
  • The agent event proxy part comes with Connect the dd-openfeature SDK to the agent #12844.
Shutdown flush

The event pipelines now live in the SDK, so the agent shutdown no longer flushes them.

  • New optional ShutdownSource bridge component (AgentBridge.shutdown(), null by default, backward compatible).
  • FeatureFlagsRuntime subscribes to it when the agent provides it, so the agent flushes the SDK before the JVM shutdown hooks run. Otherwise it registers its own JVM shutdown hook. Release unregisters either one, and stopping twice is a no-op.
  • The agent side (AgentShutdownSource, backend, tracing-disabled hook) comes with Connect the dd-openfeature SDK to the agent #12844.

Stack

The full change is in #12709. It was split into this stack to ease the review.

  1. Resolve Feature Flags enablement from instrumenter config #12845 (merged)
  2. Add dd-openfeature SDK flag configuration and evaluation core #12840 (merged)
  3. Add dd-openfeature SDK settings and configuration delivery #12841 (merged)
  4. Add dd-openfeature SDK exposure and flag evaluation pipelines #12842 (merged)
  5. Add dd-openfeature SDK OpenFeature provider #12843 (merged)
  6. Port master Feature Flags changes to the dd-openfeature SDK #12957 👈 this PR
  7. Connect the dd-openfeature SDK to the agent #12844
  8. Add agentless and standalone OpenFeature smoke tests #12846

Jira ticket: APMLP-1512

🤖 Generated with Claude Code

PerfectSlayer and others added 3 commits October 20, 2026 13:03
Port master #12884 to the dd-openfeature SDK: the
dd_evaluation_telemetry_opt_out context attribute suppresses evaluation
events, evaluation metrics and span enrichment for the subject when
enabled by Provider.Options.enableEvaluationTelemetryOptOutParameter or
DD_FEATURE_FLAGS_EVALUATION_TELEMETRY_PER_SUBJECT_OPT_OUT_ENABLED.
Exposures are unchanged. Provider.Options now defaults to a 30 seconds
initialization timeout, as on master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the SDK part of master #12477: direct intake no longer retries, and
the event proxy fallback switches to direct intake for good on the first
proxy failure, replaying the batch only when the proxy definitively did
not receive it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runtime now stops at application shutdown: through the new optional
ShutdownSource bridge component when the Datadog Java agent provides
it, so the agent flushes the SDK before the JVM shutdown hooks run, or
from a JVM shutdown hook otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PerfectSlayer PerfectSlayer added type: feature Enhancements and improvements tag: no release notes Changes to exclude from release notes tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature labels Oct 20, 2026
@PerfectSlayer
PerfectSlayer added this pull request to stack #12958 October 20, 2026 11:31
…thers

No released agent implements the bridge yet, so the shutdown component
needs no default method for compatibility. The no-op bridge returns
null, like the other optional components.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PerfectSlayer
PerfectSlayer marked this pull request as ready for review October 20, 2026 11:38
@PerfectSlayer
PerfectSlayer requested a review from a team as a code owner October 20, 2026 11:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T11:46:06.166099Z 44d0409 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-20T11:43:55.549264Z 44d0409 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Ambiguous proxy failures switch future batches to direct intake without replaying the uncertain batch, and exposure logging remains independent of telemetry opt-out. Shutdown lifecycle validation was limited to source and test inspection.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 44d0409

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44d0409554

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dd-octo-sts

dd-octo-sts Bot commented Oct 20, 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 13.89 s 13.89 s [-0.7%; +0.7%] (no difference)
startup:insecure-bank:tracing:Agent 12.90 s 12.96 s [-1.0%; +0.2%] (no difference)
startup:petclinic:appsec:Agent 17.11 s 16.99 s [-0.3%; +1.7%] (no difference)
startup:petclinic:iast:Agent 17.01 s 17.06 s [-1.1%; +0.6%] (no difference)
startup:petclinic:profiling:Agent 16.50 s 16.83 s [-3.0%; -0.9%] (maybe better)
startup:petclinic:sca:Agent 17.11 s 16.89 s [+0.4%; +2.3%] (maybe worse)
startup:petclinic:tracing:Agent 16.22 s 15.95 s [+0.6%; +2.7%] (maybe worse)

Commit: 289b36c1 · 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.

PerfectSlayer and others added 2 commits October 20, 2026 14:07
…ipelines

The runtime closed the flag evaluation pipeline, waiting up to 5 seconds,
before even signaling the exposure pipeline, then waited up to another
800 ms: a stalled final POST could hold the JVM exit for almost 6 seconds
and starve the exposures flush. Port the two-phase shutdown of the agent
writers: signal both pipelines, then await both against one 800 ms
deadline, without interrupting a current or final HTTP request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bscription fails

A failing agent shutdown subscription escaped the shared runtime
acquisition after the runtime started, leaking it and failing the
provider initialization. Fall back to the JVM shutdown hook instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@datadog-official

datadog-official Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 59.83% (-0.02%)

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

…g caller defaults when the RC connector is unavailable

@sarahchen6 sarahchen6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Labels

comp: openfeature OpenFeature tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants