Skip to content

Prototype SSI OpenFeature provider injection - #12192

Draft
leoromanovsky wants to merge 3 commits into
masterfrom
agent/ssi-openfeature-provider-spike
Draft

Prototype SSI OpenFeature provider injection#12192
leoromanovsky wants to merge 3 commits into
masterfrom
agent/ssi-openfeature-provider-spike

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Motivation

The current Java integration requires customers to add and register the Datadog OpenFeature provider. This does not provide the intended Single Step Instrumentation customer experience.

This prototype tests whether one dd-java-agent.jar can own configuration delivery and install the provider when an application uses OpenFeature.

Agentless is the product-default deployment mode. The source setting remains explicit because it starts request and billing activity.

Changes and Decisions

  • Treat an omitted DD_FEATURE_FLAGS_CONFIGURATION_SOURCE as disabled.
  • Start the CDN poller when the customer explicitly selects agentless.
  • Keep remote_config as an explicit Agent-backed source.
  • Add a Feature Flags instrumentation target that is independent from tracing.
  • Instrument OpenFeatureAPI.getInstance() for OpenFeature Java SDK 1.20.x.
  • Inject the provider and evaluator helpers into the application classloader.
  • Install only when the active provider is exactly NoOpProvider.
  • Never replace a customer-selected provider.

The customer application needs only the OpenFeature SDK and standard OpenFeature code:

OpenFeatureAPI api = OpenFeatureAPI.getInstance();
Client client = api.getClient("java");

This prototype reuses the current provider to isolate provider injection and source lifecycle behavior. It does not implement the final evaluation-only provider, injected telemetry hook, direct EVP fallback, or offline byte initialization.

The matching dogfood integration is DataDog/ffe-dogfooding#110.

Validation

Manual end-to-end proof used the linked dogfood application and a controlled UFC endpoint.

  • The application JAR contained no Datadog OpenFeature provider classes.
  • The application JAR contained no OpenTelemetry classes.
  • The explicit agentless source made one UFC request.
  • The provider reached READY after 34 ms.
  • Evaluation returned allocation rollout, variant pi, value 3.1415926, and reason STATIC.
  • The same flow passed with DD_TRACE_ENABLED=false.
  • The no-source control made zero UFC requests and did not inject the provider.
  • The no-source evaluation returned the application default with PROVIDER_NOT_READY behavior.

This validates behavior after Java agent attachment. It does not validate SSI attachment on each serverless platform.

@dd-octo-sts

dd-octo-sts Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

❌ New Groovy Files Detected

Please avoid introducing new .groovy files to this repository.

  • dd-java-agent/instrumentation/openfeature/openfeature-1.20/src/test/groovy/OpenFeatureProviderInjectionTest.groovy

Instead, rewrite the new file(s) in Java / JUnit. See the How to Test With JUnit Guide for more details.

If this PR needs an exception, add the tag: override groovy enforcement label to bypass this workflow.

@datadog-datadog-prod-us1

This comment has been minimized.

@leoromanovsky leoromanovsky changed the title Prototype SSI OpenFeature provider injection Prototype SSI OpenFeature provider injection and agentless exposure egress Aug 12, 2026
@leoromanovsky leoromanovsky added tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature type: feature Enhancements and improvements labels Aug 12, 2026
@leoromanovsky leoromanovsky changed the title Prototype SSI OpenFeature provider injection and agentless exposure egress Prototype SSI OpenFeature provider injection Aug 12, 2026
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 type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant