Request feature flag config on the first RC poll#11465
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intoMay 27, 2026
Merged
Conversation
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master resultsStartup Time
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
aarsilv
approved these changes
May 27, 2026
Contributor
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A customer can hit this even when the Datadog Agent has already been running for hours. The important moment is when the Java tracer starts.
When a new tracer RC client first talks to the Agent, the Agent has a fast path to fetch config for that new client. If Java's first RC request does not ask for
FFE_FLAGS, the Agent cannot fetch feature flag config on that fast path. Java may ask forFFE_FLAGSon a later poll, but by then the Agent already knows that RC client, so the later request can wait for the normal Agent refresh path. That is the startup window where the OpenFeature provider can stay on default values even though the application is already running.This PR makes Java ask for feature flag config on the first RC request from the tracer. That lets an already-running Agent fetch
FFE_FLAGSimmediately for the newly-started tracer, instead of discovering the product after the new-client fast path was missed.Changes
Start the feature flagging subsystem before the shared remote-config poller is started from Agent startup. Feature flagging already registers the
FFE_FLAGSlistener and capability with the shared poller; moving it beforemaybeStartRemoteConfigensures those fields are present when the immediate first poll is scheduled.The OpenFeature smoke test now asserts the first captured
/v0.7/configrequest already includesFFE_FLAGSandCAPABILITY_FFE_FLAG_CONFIGURATION_RULES. The test comment calls out why this is the important behavior: for an Agent that is already running, the first request from this newly-started tracer is the request that can use the Agent's new-client cache bypass.Decisions
This mirrors the Go tracer early FFE RC subscription pattern without changing provider evaluation semantics, initialization timeout behavior, or the Agent remote-config service. In Go,
startRemoteConfigcallsinternalffe.SubscribeRC()before starting the RC client when the flagging provider is enabled: https://github.com/DataDog/dd-trace-go/blob/080ee3ab146e57344317a5ac48b2686735bf10fb/ddtrace/tracer/remote_config.go#L510-L512. The OpenFeature subscription helper documents the same first-poll requirement: https://github.com/DataDog/dd-trace-go/blob/080ee3ab146e57344317a5ac48b2686735bf10fb/internal/openfeature/rc_subscription.go#L42-L45.The smoke test is intentionally tracer-side because it checks the invariant dd-trace-java owns: the tracer must advertise FFE on its first RC request. A full Nasdaq reproduction still belongs in system-tests or Agent coverage: Agent already running with no
FFE_FLAGScache, backend able to return FFE only after the new tracer advertises that product, and the first tracer response validated for fast delivery.