Skip to content

Inject the Datadog OpenFeature provider with the Java agent - #12252

Draft
leoromanovsky wants to merge 4 commits into
leo.romanovsky/openfeature-standalone-runtimefrom
leo.romanovsky/openfeature-ssi-injection
Draft

Inject the Datadog OpenFeature provider with the Java agent#12252
leoromanovsky wants to merge 4 commits into
leo.romanovsky/openfeature-standalone-runtimefrom
leo.romanovsky/openfeature-ssi-injection

Conversation

@leoromanovsky

Copy link
Copy Markdown
Contributor

Motivation

Customers using SSI should not need to add the Datadog provider dependency or provider bootstrap code to their applications. Loading the Java agent must be sufficient to connect an application that only uses the OpenFeature SDK to the Feature Flagging runtime, including when tracing is disabled. At the same time, applications that have selected another provider must not be overwritten.

Changes

This change adds OpenFeature SDK instrumentation that installs the Datadog provider on the first OpenFeature API access when Feature Flagging has been explicitly configured. It adds Feature Flagging as an instrumentation target system so the module is included in the production instrumenter index, makes the Feature Flagging bootstrap gateway available to injected helpers, and records the OpenFeature instrumentation kill switch. JUnit 5 coverage verifies injection with tracing disabled, preservation of an application provider, absence of injection without Feature Flagging configuration, and the integration kill switch.

Decisions

Injection replaces only the SDK built-in no-op provider and is enabled only when a Feature Flagging setting is explicit and resolves to enabled. This prevents the Java agent from changing unrelated OpenFeature applications. The agent runtime remains the single owner in SSI mode; the provider reuses its gateway and configuration path instead of starting the standalone runtime. The module targets OpenFeature SDK 1.20.1 through the next major version and is guarded by Muzzle.

@leoromanovsky leoromanovsky added comp: openfeature OpenFeature type: feature Enhancements and improvements tag: no release notes Changes to exclude from release notes tag: ai generated Largely based on code generated by an AI or LLM labels Aug 21, 2026 — with ddtool CLI
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Aug 21, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 0.00%
Overall Coverage: 58.59% (-19.83%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6b47adb | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Aug 21, 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.99 s 13.99 s [-0.8%; +0.8%] (no difference)
startup:insecure-bank:tracing:Agent 13.01 s 12.91 s [-0.0%; +1.5%] (no difference)
startup:petclinic:appsec:Agent 16.98 s 16.74 s [+0.6%; +2.3%] (maybe worse)
startup:petclinic:iast:Agent 16.88 s 16.94 s [-1.0%; +0.4%] (no difference)
startup:petclinic:profiling:Agent 16.65 s 16.97 s [-3.0%; -0.7%] (maybe better)
startup:petclinic:sca:Agent 16.71 s 16.44 s [+0.7%; +2.6%] (maybe worse)
startup:petclinic:tracing:Agent 16.11 s 16.12 s [-0.7%; +0.7%] (no difference)

Commit: 6b47adb9 · 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

comp: openfeature OpenFeature tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant