Skip to content

Preserve Feature Flagging configuration source semantics#11992

Draft
leoromanovsky wants to merge 6 commits into
leo.romanovsky/ffl-2693-java-agentless-configuration-sourcefrom
leo.romanovsky/ffl-2693-java-configuration-contract
Draft

Preserve Feature Flagging configuration source semantics#11992
leoromanovsky wants to merge 6 commits into
leo.romanovsky/ffl-2693-java-agentless-configuration-sourcefrom
leo.romanovsky/ffl-2693-java-configuration-contract

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Motivation

Complete the Feature Flags configuration migration on top of sealed #11892 without creating phantom billed traffic. New customers default to CDN-backed delivery only after application provider access, while existing users of the legacy experimental enablement variable remain on Remote Configuration during the migration window.

flowchart TD
  Start["Agent starts"] --> Enabled{"DD_FEATURE_FLAGS_ENABLED"}
  Enabled -->|"false"| Disabled["Provider disabled<br/>No RC or CDN traffic"]
  Enabled -->|"true or unset"| Resolve{"Resolve source and legacy state"}
  Resolve -->|"explicit or grandfathered RC"| RC["Subscribe to FFE_FLAGS"]
  Resolve -->|"agentless or new default"| Wait["Wait for application provider access"]
  Resolve -->|"legacy false, invalid, or offline"| Disabled
  Wait --> Access["Application initializes or accesses provider"]
  Access --> CDN["Poll CDN-backed API"]
Loading

Changes

flowchart LR
  Env["Environment configuration"] --> Config["FeatureFlaggingConfig resolver"]
  Config --> Bootstrap["Agent bootstrap gate"]
  Bootstrap -->|"disabled"| Noop["Provider off"]
  Bootstrap -->|"remote_config"| Remote["Eager RC subscription"]
  Bootstrap -->|"agentless"| Lazy["Lazy agentless source"]
  Lazy --> Boundary["Provider access"]
  Boundary --> Poller["UFC HTTP poller"]
  Tests["Resolver, Config, bootstrap,<br/>evaluator, system, and dogfood tests"] -. "verify" .-> Config
  Tests -. "verify lifecycle" .-> Bootstrap
Loading
  • Add DD_FEATURE_FLAGS_ENABLED as the canonical provider and delivery kill switch.
  • Preserve legacy true as Remote Configuration and legacy false as disabled when no new source is explicit.
  • Defer agentless source startup until application code initializes or accesses the Datadog OpenFeature provider.
  • Keep explicit and grandfathered Remote Configuration startup eager so the existing FFE_FLAGS subscription is preserved.
  • Keep source resolution in the existing Feature Flagging config holder to stay within the agent JAR budget.
  • Add resolver, bootstrap gateway, evaluator, system lifecycle, and Config coverage.

Decisions

  • DD_FEATURE_FLAGS_ENABLED=false wins over every source and prevents both CDN polling and the FFE_FLAGS subscription.
  • An explicit DD_FEATURE_FLAGS_CONFIGURATION_SOURCE wins over the legacy setting.
  • With no explicit source, legacy true selects Remote Configuration, legacy false disables Feature Flags, and an absent legacy variable selects agentless.
  • Invalid and reserved offline sources fail closed.
  • Agentless delivery remains idle until provider access; Remote Configuration remains eager.
  • Configuration source remains immutable after initialization.
  • This PR is stacked on sealed Add agentless Feature Flagging configuration source #11892 and does not change that parent branch.

Validation

  • Full ./gradlew spotlessCheck: passed.
  • Focused Feature Flagging config and internal Config tests, plus :dd-java-agent:agent-bootstrap:spotbugsMain: passed.
  • :dd-java-agent:verifyAgentJarContents: passed.
  • Agent JAR: 34,549,568 bytes, 53,440 bytes below the 34,603,008-byte CI budget.
  • system-tests Java source-selection matrix plus generic /ffe/start: 11 passing.
  • Local dogfood: no selectors kept startup silent and provider access started agentless delivery; DD_FEATURE_FLAGS_ENABLED=false kept both startup and provider access silent.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 56.07%
Overall Coverage: 57.36% (-0.00%)

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

@dd-octo-sts

dd-octo-sts Bot commented Jul 18, 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.98 s 13.89 s [+0.0%; +1.3%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.87 s 12.99 s [-1.7%; -0.0%] (maybe better)
startup:petclinic:appsec:Agent 16.71 s 16.52 s [+0.3%; +2.1%] (maybe worse)
startup:petclinic:iast:Agent 16.91 s 16.85 s [-0.6%; +1.3%] (no difference)
startup:petclinic:profiling:Agent 16.73 s 16.78 s [-1.3%; +0.7%] (no difference)
startup:petclinic:sca:Agent 17.01 s 16.85 s [+0.0%; +1.8%] (maybe worse)
startup:petclinic:tracing:Agent 15.54 s 16.26 s [-8.6%; -0.3%] (maybe better)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant