Skip to content

Add the agent bridge for the dd-openfeature SDK - #12975

Open
PerfectSlayer wants to merge 3 commits into
masterfrom
bbujon/ffe-agent-bridge
Open

PerfectSlayer wants to merge 3 commits into
masterfrom
bbujon/ffe-agent-bridge

Conversation

@PerfectSlayer

@PerfectSlayer PerfectSlayer commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

What Does This Do

Adds the agent side of the bridge between the dd-openfeature SDK and the agent, without enabling it yet:

  • New dd-openfeature-1.69 instrumentation: instruments the SDK AgentBridges.detect() to return a JavaAgentBridge backed by an agent backend.
  • New FeatureFlaggingGateway.Backend interface on the bootstrap gateway, next to its current API. It only carries JDK types.

No backend is registered yet, so the bridge returns the SDK fallback and nothing changes at runtime. Released SDKs (1.56 to 1.67) don't contain AgentBridges and are not instrumented.

Motivation

First step of connecting the standalone SDK to the agent (APMLP-1512), so the bridge plumbing can be reviewed on its own.

Additional Notes

Files
File Notes
DDOpenFeatureInstrumentation InstrumenterModule("openfeature") for the FEATURE_FLAGS target system, instruments AgentBridges.detect()
DetectBridgeAdvice Exit advice replacing the detected bridge with JavaAgentBridge.connect(fallback)
JavaAgentBridge SDK AgentBridge backed by FeatureFlaggingGateway.backend(); returns the fallback without backend. shutdown() returns null for now (TODO), so the SDK uses its own JVM shutdown hook
AgentConfigurationSource, AgentEventProxy, AgentHealthMetrics, AgentSpanEnricher Adapters from the SDK bridge SPI to the gateway Backend
FeatureFlaggingGateway Adds Backend, register() and backend()
DDOpenFeatureInstrumentationTest, …DisabledForkedTest Detection, fallback and delegation with a mocked backend; no instrumentation when Feature Flags is disabled
metadata/* openfeature integration and its DD_TRACE_OPENFEATURE_ENABLED setting

validate_supported_configurations_v2_local_file needs DD_TRACE_OPENFEATURE_ENABLED (and its 2 aliases) registered in the Feature Parity Dashboard.

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 👈 this PR
  8. Connect the dd-openfeature SDK to the agent #12844
  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

…e SDK

Instrument the SDK bridge detection to connect the SDK to an agent
Feature Flags backend registered on the bootstrap gateway. The backend
interface only carries JDK types. No backend is registered yet, so the
SDK keeps using its own fallback.

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

datadog-datadog-prod-us1-2 Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 0.00%
• Overall Coverage: 59.85% (+0.00%)

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

@PerfectSlayer
PerfectSlayer marked this pull request as ready for review October 21, 2026 12:12
@PerfectSlayer
PerfectSlayer requested review from a team as code owners October 21, 2026 12:12
@PerfectSlayer
PerfectSlayer requested review from AlexeyKuznetsov-DD and ygree and removed request for a team October 21, 2026 12:12
@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-21T12:19:28.639178Z 0a95b73 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-21T12:16:00.294531Z 0a95b73 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.

@dd-octo-sts

dd-octo-sts Bot commented Oct 21, 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.94 s 13.92 s [-0.6%; +0.8%] (no difference)
startup:insecure-bank:tracing:Agent 12.86 s 12.95 s [-1.3%; -0.1%] (maybe better)
startup:petclinic:appsec:Agent 17.08 s 16.96 s [-0.3%; +1.6%] (no difference)
startup:petclinic:iast:Agent 16.87 s 17.04 s [-1.8%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 16.70 s 16.84 s [-1.8%; +0.2%] (no difference)
startup:petclinic:sca:Agent 17.04 s 16.22 s [+0.6%; +9.4%] (maybe worse)
startup:petclinic:tracing:Agent 15.73 s 16.17 s [-6.8%; +1.4%] (no difference)

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

@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: 0a95b73784

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

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 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

Bridge detection preserves the SDK fallback until a backend is registered. The completed static review found no actionable defects in the adapters, helper injection, or fallback behavior.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 0a95b73

PerfectSlayer and others added 2 commits October 22, 2026 12:56
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>
Mark the instrumentation module and advice classes as unused, as they are
only referenced through AutoService and advice class names, and import
the Advice annotations statically.

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.

Nice!

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: 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