Repository navigation
Connect the dd-openfeature SDK to the agent - #12844
PerfectSlayer wants to merge 8 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
cdbf2c1 to
95be4d3
Compare
95be4d3 to
128b8ba
Compare
128b8ba to
9027902
Compare
9027902 to
a6f0035
Compare
a6f0035 to
7db60be
Compare
7db60be to
e00532b
Compare
e00532b to
e4e4a30
Compare
e4e4a30 to
d4e4bbf
Compare
d4e4bbf to
fd5f72b
Compare
c439182 to
04b9d07
Compare
e8f4ee8 to
4579adc
Compare
083b755 to
e3e6694
Compare
77efd39 to
54d7a79
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
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.
🤖 Bits Code Review · Commit 078b457
There was a problem hiding this comment.
💡 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".
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>
Check the API outside the internal packages with japicmp against the previous dd-openfeature release, failing on binary or source incompatible changes. The baseline is the latest release before the version being built, so release branches compare against their own line and each release keeps the API of all the previous ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| this.started = false; | ||
| this.configurationPoller.removeCapabilities(CAPABILITY_FFE_FLAG_CONFIGURATION_RULES); | ||
| this.configurationPoller.removeListeners(FFE_FLAGS); | ||
| this.subscribers.clear(); |
There was a problem hiding this comment.
Release the poller reference when closing the service
After start(), close() no longer balances configurationPoller.start(). DefaultConfigurationPoller reference-counts start/stop, so removing listeners leaves its scheduled task active after the last consumer closes; restarting the service leaks another reference. Restore the matching stop() call and update the close test, which currently asserts that stop() is never called. Reference counting already protects other products sharing the poller.
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
What each reaction means
- 👍 Useful: correct, and you're fixing it or will.
- 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
- 😕 Unclear: you can't tell what it means or why it matters.
- 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.
🤖 Bits Code Review · Open Bits AI session
There was a problem hiding this comment.
An agent configuration-file disable can be bypassed by the SDK's agentless fallback. Closing the Remote Configuration service also leaves its poller reference active.
🤖 Bits Code Review · Commit 3138adb
Findings that could not be posted inline
dd-java-agent/instrumentation/datadog/openfeature/dd-openfeature-1.69/src/main/java/datadog/trace/instrumentation/openfeature/DDOpenFeatureInstrumentation.java:29
Honor feature-flag disables from agent configuration
When feature flags are disabled through the agent configuration file, this gate prevents bridge installation and FeatureFlaggingSystem also leaves the backend unregistered. The SDK receives AgentBridge.NONE, misses the disable setting, and defaults to agentless mode. With DD_API_KEY and DD_ENV configured, registering the provider starts CDN polling and direct event delivery despite the explicit disable. Preserve access to the agent's disable setting; both instrumentation gating and backend registration need to accommodate this.
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
What each reaction means
- 👍 Useful: correct, and you're fixing it or will.
- 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
- 😕 Unclear: you can't tell what it means or why it matters.
- 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.
🤖 Bits Code Review · Open Bits AI session
What Does This Do
Switches the agent to the standalone
dd-openfeatureSDK:FeatureFlagsBackendon the gatewayBackendadded 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.FeatureFlaggingSystembuilds, starts and registers the backend.feature-flagging-apiand the agent-coupled writers, parser and agentless code, now owned by the SDK, with their agentless agent settings.:dd-openfeatureascom.datadoghq:dd-openfeature. System tests build the matching jar; the smoke application usescom.datadog.openfeature.Provider.datadog.trace.api.openfeature.Provideras a deprecated alias ofcom.datadog.openfeature.Provider, with its legacy opt-out setter signature. Applications, and the system tests weblogs, still register the provider under that name.datadog.trace.api.openfeature.ExposureHook, documented on master, as a deprecated wrapper ofcom.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
FeatureFlagsBackend(+ test)Backend: settings fromConfig(agent defaults for API key, site, env, service, version; others fromconfigProvider()), lazyRemoteConfigServiceImpl, event proxy delegation, health metrics throughCoreMetricCollector, span enrichment throughSpanEnrichmentWriterEventProxy(+ test)dd-openfeaturedatadog/trace/api/openfeature/Provider(+ test)dd-openfeaturedatadog/trace/api/openfeature/ExposureHook(+ test)EvaluationSignificant changes
FeatureFlaggingGatewayBackendregistration is leftRemoteConfigServiceImplFFE_FLAGSdocuments (nullon removal) to subscribers, replays the current one to late subscribersSpanEnrichmentWriterserialId(...)/runtimeDefault(...)called by the backend instead of listening to the gatewayFeatureFlaggingSystemConfig,ConfigDefaults,ConfigTestBackend.setting()dd-openfeature/build.gradle.ktsAutomatic-Module-Name, Java 11 javadoc; thevalidate_buildjar comparison (compareToReferenceJar) now covers the SDK jar too;japicmpPublicApichecks the public API (outsideinternal) stays compatible with the previous releaseStack
The full change is in #12709. It was split into this stack to ease the review.
Jira ticket: APMLP-1512
🤖 Generated with Claude Code