Repository navigation
Add dd-openfeature SDK OpenFeature provider - #12843
Draft
PerfectSlayer wants to merge 3 commits into
Draft
PerfectSlayer wants to merge 3 commits into
PerfectSlayer wants to merge 3 commits into
Conversation
This was referenced Oct 13, 2026
PerfectSlayer
added this pull request to stack #12847
October 13, 2026 07:19
This comment has been minimized.
This comment has been minimized.
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. |
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 13, 2026 09:03
afa5b21 to
a5c7a57
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 13, 2026 09:27
a5c7a57 to
7858ad8
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 13, 2026 10:07
7858ad8 to
63abca3
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 13, 2026 10:28
63abca3 to
0fb68c6
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 13, 2026 10:58
0fb68c6 to
3f9d8b8
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 13, 2026 13:50
3f9d8b8 to
27d4862
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 14, 2026 05:33
27d4862 to
107bf8b
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 14, 2026 06:02
107bf8b to
6a0427d
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 14, 2026 06:15
6a0427d to
1bd038c
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 14, 2026 07:10
1bd038c to
3272ddb
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 14, 2026 08:06
3272ddb to
a39c1f6
Compare
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 14, 2026 08:38
a39c1f6 to
613f720
Compare
Add the com.datadog.openfeature.Provider OpenFeature provider, its evaluator and hooks (metrics, logging, span enrichment), and the runtime wiring the configuration delivery and event pipelines together. The SDK is still not published, the agent-coupled provider remains the shipped one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The evaluator now builds OpenFeature ImmutableMetadata directly, so the provider no longer copies it on every evaluation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The evaluator now takes the OpenFeature context and returns the ProviderEvaluation, so the provider no longer adapts the context and converts the result on every evaluation. Exposures are dispatched through the evaluator ExposureListener. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PerfectSlayer
force-pushed
the
bbujon/ffe-sdk-provider
branch
from
October 14, 2026 08:42
613f720 to
d3753d0
Compare
This branch has not been deployed
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.
What Does This Do
Adds
com.datadog.openfeature.Provider, its evaluator (DDEvaluator), hooks (metrics, logging, span enrichment) andFeatureFlagsRuntimewiring configuration delivery and event pipelines together. The SDK is still not published; the agent-coupled provider remains the shipped one.Motivation
Completes the standalone SDK (APMLP-1512).
Additional Notes
Most of this PR moves code from master's
products/feature-flagging/feature-flagging-api(datadog.trace.api.openfeature). Review carefully the newinternal/FeatureFlagsRuntime, the newProvider/DDEvaluatorwiring (connector SPI andSettingsinstead ofFeatureFlaggingGateway, bootstrap classes and reflection), and the lazy OTel resolution inFlagEvalMetrics.New files
internal/FeatureFlagsRuntimeacquire()/release()), replacing the agent-side gateway. Picks the configuration source fromSettings(Remote Config through the connector, failing without the agent, or the CDN) and the event transport (agent event proxy, direct intake, or proxy → direct fallback). Owns the exposure and flag evaluation pipelines (evaluation pipeline skipped by the evaluation counts kill switch, both skipped without transport). Fans configuration out to listeners and replays it to late ones. A failed start is rolled back and not cachedinternal/FeatureFlagsRuntimeTestinternal/evaluation/ConfigurationStoreDDEvaluator, previously fields of the oldDDEvaluatorCanonicalFixtureTestDDEvaluatorTest. Reads theffe-system-test-datasubmodule (dd-smoke-tests/openfeature/src/test/resources/ffe-system-test-data) withJsonReadinginstead of MoshiFlagEvalMetricsLateSdkForkedTestGlobalOpenTelemetry, and metrics flow once the SDK is setMoved, package rename only (no logic change)
Evaluator,FlagEvalMetricsHookFlagEvalMetricsHookTest,FlagEvalMetricsTestMoved with significant changes
ProviderProviderConnectors.detect()andSettings.load(connector), buildsDDEvaluatordirectly (reflectiveloadEvaluatorClass()/EVALUATOR_IMPLremoved). Span enrichment gate read fromSettings(SpanEnrichmentGateremoved);SpanEnrichmentHookgetsconnector.spanEnricher().FlagEvalLoggingHookalways added, resolving its writer lazily from the runtime;LinkageErrorguard dropped.FatalErrormessage now uses the cause message. Public constructors andOptionsunchangedDDEvaluatorDDEvaluatorinternal/evaluation/FlagEvaluator(#12840). Kept:evaluate()delegating toFlagEvaluator(OpenFeature types end to end, no conversion), exposure building (via theFlagEvaluatorExposureListener) and recording, context snapshot / flatten / prune helpers. Lifecycle: package-private(Runnable, Connector, Settings)constructor; synchronizedinitialize()/shutdown()acquire / releaseFeatureFlagsRuntimeand register aConsumer<ServerConfiguration>(wasFeatureFlaggingGateway.activate()/ConfigListener);ConfigurationStorereplaces latch +AtomicReference. Removed: agent compatibility probes (SPLIT_SERIAL_ID_SUPPORTED,USE_LEGACY_EXPOSURE_API, legacyExposureEventconstructor) and static span enrichment gate. Exposures go toruntime.recordExposure()instead ofFeatureFlaggingGateway.dispatch()FlagEvalMetricsFlagEvalMetricsGlobalOpenTelemetry.get(). Now resolves the counter lazily onrecord()withgetOrNoop(), rebuilds it when the global instance changes, falls back toget()only for OTel API < 1.57 or a legacy OTel javaagent bridge, disables itself onLinkageError. Synchronizedshutdown()with aclosedflagFlagEvalLoggingHookFlagEvalLoggingHookSupplier<FlagEvaluationWriter>constructor;INSTANCEsingleton, gateway constructors andisFlagEvaluationEnqueueEnabled()check removedSpanEnrichmentHookSpanEnrichmentHookSpanEnricher(serialId/runtimeDefault) instead of dispatchingSpanEnrichmentEventon the gateway. Capture logic unchangedjmh/FlagEvalHookHotPathBenchmark@TearDownremoved, writer injected through a supplier, run command now:dd-openfeature:jmhProviderTestProviderTestProxyConnector,LocalHttpServer,TestSettings). Internal API linkage failure tests removed. New: product disabled, Remote Config without agent, end-to-end evaluation posted through the pipelineDDEvaluatorTestDDEvaluatorTestCanonicalFixtureTest. Exposures captured by overridingrecordExposure. New: type compatibility, container cycles in context copy / flatten, empty and scalar valuesDDEvaluatorSpanEnrichmentTestDDEvaluatorSpanEnrichmentForkedTestTestSettingsinstead of a static. Tests for agents without serial id support removedFlagEvalLoggingHookTestFlagEvalLoggingHookTestSpanEnrichmentHookTestSpanEnrichmentHookTestSpanEnricherreplaces the gateway listenerShared files
dd-openfeature/build.gradle.kts: addsapi("io.opentelemetry:opentelemetry-api:1.66.0"); OTel API becomes a hard transitive dependency (master had itcompileOnly1.47.0 and handled its absence)dd-openfeature/gradle.lockfile: updated for the OTel dependencyStack
The full change is in #12709. It was split into this stack to ease the review.
Jira ticket: APMLP-1512
🤖 Generated with Claude Code