Repository navigation
Send Java SDK identity with Feature Flagging EVP events - #12575
gh-worker-dd-mergequeue-cf854d[bot] merged 17 commits into
Conversation
Add capability-gated local discovery, safe sticky direct fallback, shared route state, send-once semantics, and bounded lifecycle handling for Java Feature Flags telemetry. Environment: Datadog workspace
Move identity attribution to a follow-up branch while keeping forwarding-capability requirements explicit and independent of emitted headers. Preserve credential isolation, no-replay coverage, and existing lifecycle hardening. Validation: communication tests 234/234 and feature-flagging-lib tests 279/279 pass; scoped Spotless formatting passes. Environment: Datadog workspace
Add immutable per-request identity headers independently of forwarding capability checks and send-once policy. Emit dd-trace-java and the tracer version for both exposure and flag-evaluation requests. Validation: communication tests 235/235 and feature-flagging-lib tests 279/279 pass; scoped Spotless formatting passes. Local/direct wire assertions preserve credential isolation and one-send behavior. Environment: Datadog workspace
🟢 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. |
Environment: Datadog workspace
Gate shutdown instrumentation on tracing or resolved feature flag enablement, and share Agent path joining. Pin recovery generations, discovery concurrency, replay, idle recovery, and disabled-product behavior with regression tests. Environment: Datadog workspace
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.
More details
Java SDK identity headers reach both local EVP and direct-intake requests while preserving credential isolation, send-once settings, and redirect behavior. The completed static review identified no actionable regression.
🤖 Bits Code Review · Commit 96a3427 · @DataDog review to ask questions
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
Port #12575 to the SDK and the agent bridge: exposures and flag evaluations carry the DD-EVP-ORIGIN and DD-EVP-ORIGIN-VERSION headers, dd-trace-java and the library version, through the agent event proxy and direct intake alike. An agentless proxy endpoint is used only when the Agent forwards both headers. The smoke tests mock Agent advertises them like the Agent does.
Port #12575 to the SDK and the agent bridge: exposures and flag evaluations carry the DD-EVP-ORIGIN and DD-EVP-ORIGIN-VERSION headers, dd-trace-java and the library version, through the agent event proxy and direct intake alike. An agentless proxy endpoint is used only when the Agent forwards both headers. The smoke tests mock Agent advertises them like the Agent does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(ffe): Restore the agent Feature Flags behaviors through the bridge Port the agent-side behaviors of the removed writers: send each event batch once with proxy discovery and recovery, and the Java SDK identity headers (#12477, #12575); flush the SDK pending events at agent shutdown, with or without tracing; declare the SDK settings the agent exposes (#12884, #12774). Move the Feature Flags shutdown tests from the agent tests to the OpenFeature smoke tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> fix(ffe): Guard OpenFeature agent bridge against incompatible SDK interfaces fix(ffe): Report rejected Remote Configuration flag documents as apply errors The SDK dropped malformed Remote Configuration documents and the agent swallowed subscriber failures, so the poller acknowledged documents the SDK never applied. The SDK now rejects malformed documents by throwing, and the agent rethrows the first subscriber failure once every subscriber is notified, so the poller reports an apply error as before the switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> fix(ffe): Release the Remote Configuration poller when closing Feature Flags The poller reference-counts start and stop calls, but closing the Feature Flags Remote Configuration service no longer stopped it, keeping it polling once Feature Flags closed and leaking a reference on each restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> fix(ffe): Flush Feature Flags at exit when the shutdown instrumentation is disabled The Feature Flags shutdown hook was only registered when tracing was disabled, but the tracing shutdown path also relies on the shutdown instrumentation, which can be disabled on its own. The hook is now always registered once the SDK subscribes to the shutdown; stopping is idempotent, so it does nothing after the tracing shutdown path already stopped Feature Flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> test(ffe): Drop the agent bridge class loader test The test rewrote the SPI classes to check the runtime SPI guard. The japicmp bridge SPI check covers SPI compatibility once the SPI is released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> chore(ffe): Mark the runtime bridge SPI check for removal after 1.69.0 Once dd-openfeature 1.69.0 is released, the japicmpBridgeV1 task checks the frozen bridge.v1 SPI, so the runtime check of the helpers becomes redundant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> chore(ffe): Track the checks to enable after the dd-openfeature 1.69.0 release Reference APMLP-1512 in the TODOs waiting for the first SDK release with the agent bridge, and prepare the muzzle pass directive of the bridge instrumentation, to enable once 1.69.0 is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> chore(ffe): Drop the TODO about Remote Configuration without the agent Remote Configuration without the Datadog Java agent is out of scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> fix(ffe): Keep event proxy available with blank API key (cherry picked from commit ef95143) fix(ffe): Defer RC until an SDK subscriber is validated (cherry picked from commit dc27b62) fix(ffe): Restore RC before SDK subscriber is validated (cherry picked from commit c8ab5f6) fix(ffe): Report a rejected Remote Configuration document received before the SDK The agent registers the Feature Flags product at startup, so the first document usually arrives before any SDK subscribes and is acknowledged without validation. When the first subscriber rejects it on replay, the service now registers the product again, which drops its cached documents, so the next poll delivers the document again and reports the rejection as an apply error, without depending on the Remote Configuration core. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> test(ffe): Check a malformed first Remote Configuration document is reported The smoke application can now register its provider on request instead of at startup, so the test delivers a malformed flag configuration before the SDK subscribes, then checks the agent reports it as not applied once the SDK rejects it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> docs(ffe): Qualify when the agent shutdown notifies the SDK The agent shutdown notifies the SDK before the JVM shutdown hooks only when the tracing shutdown instrumentation runs, otherwise from a JVM shutdown hook. Document what always holds: the notification comes before the agent releases its Feature Flags resources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> test(ffe): Check the shutdown flush with a single smoke test The Feature Flagging shutdown hook is now always registered once the SDK subscribes, whether tracing is enabled or not, so the tracing disabled variant tested the same behavior. Keep one test, with the default setup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: sarahchen6 <sarah.chen@datadoghq.com> Co-authored-by: bruce.bujon <bruce.bujon@datadoghq.com>
Motivation
Attribute Feature Flagging exposures and flag evaluations to the Java SDK on both local EVP proxy and direct-intake routes. Initial direct delivery already shipped; this PR isolates producer identity from the transport hardening in #12477. Tracks FFL-3016 within the FFLSDK-187 rollout.
Changes
DD-EVP-ORIGIN: dd-trace-javaandDD-EVP-ORIGIN-VERSIONusing the tracer version.Decisions
leoromanovsky/fflsdk-187-java-evp-fallback, not another language or unrelated SDK branch.Validation
1b5766b56c67bb7151a084abb752e62e5bb4b332.96a3427bb9bcb640165306d16af141e9455e2cc4../gradlew :communication:spotlessApply :products:feature-flagging:feature-flagging-lib:spotlessApply :communication:test :products:feature-flagging:feature-flagging-lib:test --console=plain --max-workers=4: PASS; communication 235/235, feature-flagging-lib 279/279.git diff --check: PASS. New commit is GitHub verified:verified=true,reason=valid.