Inject the Datadog OpenFeature provider with the Java agent - #12252
Draft
leoromanovsky wants to merge 4 commits into
Draft
Inject the Datadog OpenFeature provider with the Java agent#12252leoromanovsky wants to merge 4 commits into
leoromanovsky wants to merge 4 commits into
Conversation
|
🎯 Code Coverage (details) 🔗 Commit SHA: 6b47adb | Docs | View more details | Give us feedback! |
Contributor
🟢 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. |
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
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.