feat(feature-flags): add InitializeAsync to manual API with CallTarget instrumentation - #9046
pavlokhrebto wants to merge 129 commits into
Conversation
BenchmarksBenchmark execution time: 2026-09-16 09:58:03 Comparing candidate commit 871aeac in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 65 known flaky benchmarks, 61 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (9046) and master. ✅ No regressions detected |
…lformed sites safely
…nd validation telemetry
… sensitive in yaml
… retry, ETag, gzip, and shutdown
…ync into FeatureFlagsModule
…ializeAsync, and source selection
…for OpenFeature InitializeAsync
…703/ffe-manual-api
…DataDog/dd-trace-dotnet into pavlo.khrebto/EX-2703/ffe-manual-api
|
🤖 Comment from Claude working with Aaron Silverman:
The legacy key is a second escape hatch. The description says manual API users "would be stuck null when legacyEnabled is not null => legacyEnabled.Value
? new(FeatureFlagsSource.RemoteConfig, RemoteConfigSourceName)
: new(FeatureFlagsSource.Offline, OfflineSourceName),
_ => new(FeatureFlagsSource.Agentless, AgentlessSourceName),So existing adopters running the legacy key keep remote_config and are unaffected. What is left is "No new tests needed" is right about the attribute pairing and not about the wiring. The pairing |
…DataDog/dd-trace-dotnet into pavlo.khrebto/EX-2703/ffe-manual-api
…elivery failure on the manual API
…o.khrebto/EX-2703/ffe-manual-api
|
closed in favor of #9260 |
Summary of changes
Adds
InitializeAsyncto theDatadog.Trace.Manualfeature flags API so that manual API users can trigger agentless delivery activation, just like OpenFeature users can.This is PR 4 of a stacked PR series implementing agentless Feature Flags configuration delivery (FFL-2703), porting functionality from dd-trace-py#19331 and dd-trace-java#11892. Stacked on PR 1 #9040, PR 2 #9042, and PR 3 #9044.
Reason for change
.NET is the only SDK with a separate manual API (
Datadog.Trace.Manual.FeatureFlagsSdk) that bypasses OpenFeature. With the new agentless default (PR 1), the agentless poller only starts atActivate(), which is called fromInitializeAsync. The manual API had noInitializeAsync, so manual API users would be stuck withPROVIDER_NOT_READYforever unless they explicitly setremote_config.Implementation details
Datadog.Trace.Manual/FeatureFlags/FeatureFlagsSdk.cs— addsInitializeAsync(CancellationToken)stub marked[Instrumented]that returnsTask.CompletedTaskFeatureFlagsSdkInitializeAsyncIntegration.cs(new CallTarget) — intercepts the stub and callsTracerManager.Instance.FeatureFlags.InitializeAsync(cancellationToken), same pattern as the OpenFeature integration in PR 3supported_calltargets.g.json— registers the new calltarget targetingDatadog.Trace.Manualversion3.31.0–3.*.*InstrumentationDefinitions.g.cs(4 generated files) — auto-updated by the build to include the new integration in the allowlistTest coverage
The
InitializeAsyncbehavior is already tested in PR 3'sFeatureFlagsModuleTests(activation, timeout, cancellation, no-delivery-start). This PR only adds the manual API stub and CallTarget wiring — no new tests needed since the underlyingFeatureFlagsModule.InitializeAsyncis unchanged.Other details
Stacked PRs:
System tests: DataDog/system-tests#7496