Skip to content

Connect the dd-openfeature SDK to the agent - #12844

Open
PerfectSlayer wants to merge 7 commits into
bbujon/ffe-agent-bridgefrom
bbujon/ffe-agent-connector
Open

PerfectSlayer wants to merge 7 commits into
bbujon/ffe-agent-bridgefrom
bbujon/ffe-agent-connector

Conversation

@PerfectSlayer

@PerfectSlayer PerfectSlayer commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

What Does This Do

Switches the agent to the standalone dd-openfeature SDK:

  • Registers the agent FeatureFlagsBackend on the gateway Backend added by Add the agent bridge for the dd-openfeature SDK #12975. It provides the agent settings, forwards the raw Remote Configuration documents, posts events through the agent event platform proxy, counts health metrics and enriches spans. The SDK keeps parsing, evaluating and batching.
  • Removes the previous gateway API (listeners, cached configuration, flag evaluation writer). FeatureFlaggingSystem builds, starts and registers the backend.
  • Removes feature-flagging-api and the agent-coupled writers, parser and agentless code, now owned by the SDK, with their agentless agent settings.
  • Publishes :dd-openfeature as com.datadoghq:dd-openfeature. System tests build the matching jar; the smoke application uses com.datadog.openfeature.Provider.
  • Keeps datadog.trace.api.openfeature.Provider as a deprecated alias of com.datadog.openfeature.Provider, with its legacy opt-out setter signature. Applications, and the system tests weblogs, still register the provider under that name.
  • Keeps datadog.trace.api.openfeature.ExposureHook, documented on master, as a deprecated wrapper of com.datadog.openfeature.ExposureHook.

Motivation

The SDK must not share dd-trace-java internals, and SDK (customer build time) and agent (SSI runtime) versions must be able to differ (APMLP-1512).

Merge #12976 right after this PR: in between, released SDKs fail with this agent. #12978 restores the send-once delivery, the identity headers and the shutdown flush of the removed writers.

Additional Notes

Most of the diff (~23k lines) deletes agent-side code and tests now in the SDK. Review the new and rewritten classes below.

New files
File Notes
lib FeatureFlagsBackend (+ test) Agent Backend: settings from Config (agent defaults for API key, site, env, service, version; others from configProvider()), lazy RemoteConfigServiceImpl, event proxy delegation, health metrics through CoreMetricCollector, span enrichment through SpanEnrichmentWriter
lib EventProxy (+ test) One agent EVP proxy client per route; connection refusal, 404 and 405 mean unavailable
dd-openfeature datadog/trace/api/openfeature/Provider (+ test) Deprecated alias of the provider and its options
dd-openfeature datadog/trace/api/openfeature/ExposureHook (+ test) Deprecated wrapper of the exposure hook and its Evaluation
Significant changes
File Changes
bootstrap FeatureFlaggingGateway Only the Backend registration is left
lib RemoteConfigServiceImpl Forwards raw FFE_FLAGS documents (null on removal) to subscribers, replays the current one to late subscribers
lib SpanEnrichmentWriter Exposes serialId(...) / runtimeDefault(...) called by the backend instead of listening to the gateway
agent FeatureFlaggingSystem Builds, starts (rolls back on failure) and registers the backend
Config, ConfigDefaults, ConfigTest Agentless base URL, poll interval and request timeout removed; the SDK reads them, still resolvable from the agent configuration through Backend.setting()
dd-openfeature/build.gradle.kts Publishing, Automatic-Module-Name, Java 11 javadoc; the validate_build jar comparison (compareToReferenceJar) now covers the SDK jar too
Tests Rewritten for raw document forwarding, enrichment entry points, backend registration and rollback; master's shutdown probe test, relying on the removed gateway API, is dropped (shutdown is covered again in #12978)

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 (merged)
  7. Add the agent bridge for the dd-openfeature SDK #12975
  8. Connect the dd-openfeature SDK to the agent #12844 👈 this PR
  9. Keep released dd-openfeature SDKs working with the agent #12976
  10. Resolve the Feature Flags settings like the SDK #12977
  11. Restore the agent Feature Flags behaviors through the bridge #12978
  12. Add agentless and standalone OpenFeature smoke tests #12846

Jira ticket: APMLP-1512

🤖 Generated with Claude Code

@datadog-official

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Oct 13, 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.79 s 14.71 s [-0.3%; +1.3%] (no difference)
startup:insecure-bank:tracing:Agent 13.66 s 13.58 s [-0.2%; +1.3%] (no difference)
startup:petclinic:appsec:Agent 17.24 s 17.59 s [-6.1%; +2.1%] (no difference)
startup:petclinic:iast:Agent 17.51 s 17.76 s [-2.5%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 17.57 s 17.06 s [-1.5%; +7.3%] (no difference)
startup:petclinic:sca:Agent 17.34 s 17.63 s [-5.9%; +2.7%] (no difference)
startup:petclinic:tracing:Agent 16.69 s 16.73 s [-1.3%; +0.8%] (no difference)

Commit: 9233bde8 · 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
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from cdbf2c1 to 95be4d3 Compare October 13, 2026 09:03
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from 95be4d3 to 128b8ba Compare October 13, 2026 09:28
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from 128b8ba to 9027902 Compare October 13, 2026 10:07
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from 9027902 to a6f0035 Compare October 13, 2026 10:28
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from a6f0035 to 7db60be Compare October 13, 2026 10:59
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from 7db60be to e00532b Compare October 13, 2026 13:50
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from e00532b to e4e4a30 Compare October 14, 2026 05:34
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from e4e4a30 to d4e4bbf Compare October 14, 2026 06:03
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from d4e4bbf to fd5f72b Compare October 14, 2026 06:16
@PerfectSlayer
PerfectSlayer changed the base branch from master to bbujon/ffe-sdk-updates October 20, 2026 11:31
@PerfectSlayer
PerfectSlayer added this pull request to stack #12958 October 20, 2026 11:31
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch 2 times, most recently from c439182 to 04b9d07 Compare October 20, 2026 12:11
@PerfectSlayer PerfectSlayer added the tag: override groovy enforcement Override the "Enforce Groovy Migration" check label Oct 20, 2026
@sarahchen6
sarahchen6 force-pushed the bbujon/ffe-agent-connector branch from e8f4ee8 to 4579adc Compare October 20, 2026 23:20
Base automatically changed from bbujon/ffe-sdk-updates to master October 21, 2026 09:23
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch 2 times, most recently from 083b755 to e3e6694 Compare October 21, 2026 11:53
@PerfectSlayer
PerfectSlayer removed this pull request from stack #12958 October 21, 2026 12:00
@PerfectSlayer
PerfectSlayer changed the base branch from master to bbujon/ffe-agent-bridge October 21, 2026 12:01
@PerfectSlayer
PerfectSlayer added this pull request to stack #12980 October 21, 2026 12:04
@PerfectSlayer
PerfectSlayer force-pushed the bbujon/ffe-agent-connector branch from 77efd39 to 54d7a79 Compare October 21, 2026 14:22
@PerfectSlayer
PerfectSlayer marked this pull request as ready for review October 21, 2026 15:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T15:49:31.463048Z 078b457 Draft marked ready
🔒 Security Review 🔄 Running since 2026-10-21T15:39:51.924418Z 078b457 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: FAIL

A temporary Agent discovery failure can permanently disable feature-flag event delivery, even after the Agent recovers. Restoring recovery requires keeping a retryable transport available through SDK initialization.

Open Bits AI session

🤖 Bits Code Review · Commit 078b457

@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: 078b457fb6

ℹ️ 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".

PerfectSlayer and others added 6 commits October 22, 2026 13:07
Register the agent Feature Flags backend on the gateway: it forwards the
raw Remote Configuration documents, posts events through the agent
event platform proxy, counts health metrics and enriches spans. The SDK
keeps parsing, evaluating and batching. Remove the agent-coupled
provider and writers, and publish the dd-openfeature SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upload the agent and dd-openfeature jars from a dedicated folder instead
of copying dd-openfeature into the agent build output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the deprecated datadog.trace.api.openfeature.Provider alias, and its
options, along with the switch to the dd-openfeature SDK: applications
and system tests still register the provider under its former name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the deprecated datadog.trace.api.openfeature.ExposureHook, and its
Evaluation type, delegating to com.datadog.openfeature.ExposureHook:
master documents the hook under its former package name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build job keeps the dd-openfeature jar: also preserve it as a
validate_build reference, and enable its compareToReferenceJar check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master removed the Gradle IDEA plugin configuration: the Java toolchain
and compiler settings already give IntelliJ the right JDK.

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

@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.

Let's do it!

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 tag: ai generated Largely based on code generated by an AI or LLM tag: do not merge Do not merge changes tag: override groovy enforcement Override the "Enforce Groovy Migration" check type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants