Repository navigation
Port master Feature Flags changes to the dd-openfeature SDK - #12957
Conversation
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>
…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>
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
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.
🤖 Bits Code Review · Commit 44d0409
There was a problem hiding this comment.
💡 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".
🟢 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. |
…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>
…g caller defaults when the RC connector is unavailable
What Does This Do
Brings master changes made to the old agent-coupled provider into the
dd-openfeatureSDK, 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), overridingDD_FEATURE_FLAGS_EVALUATION_TELEMETRY_PER_SUBJECT_OPT_OUT_ENABLEDread throughSettings.Provider.Optionsnow defaults to a 30 s init timeout, as on master.EvaluationTelemetryOptOutTestports master's 25 scenarios to the SDK test infrastructure. Environment variable cases are tested through system properties andSettingsTest, asProviderreads the real environment.Send each batch once (SDK part of #12477)
DirectIntakeTransportno longer retries (master's direct intake is now send-once: no retries, no redirects).FallbackTransportswitches to direct intake for good on the first proxy failure, replaying the batch only after a definitive proxy rejection.Shutdown flush
The event pipelines now live in the SDK, so the agent shutdown no longer flushes them.
ShutdownSourcebridge component (AgentBridge.shutdown(),nullby default, backward compatible).FeatureFlagsRuntimesubscribes 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.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.
Jira ticket: APMLP-1512
🤖 Generated with Claude Code