Repository navigation
[Feature Flags] Add debug logging for provider onboarding - #9465
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
There was a problem hiding this comment.
When DD_FEATURE_FLAGS_CONFIGURATION_SOURCE=offline (or an invalid source resolving to Offline), FeatureFlagsModule.Create returns early with advice to set DD_FEATURE_FLAGS_ENABLED=true — advice that cannot resolve the problem — before the offline diagnostic in Activate can execute. The resolved configuration source should be reported at the early-return site so onboarding logs correctly identify why no configuration is fetched.
🤖 Bits Code Review · Commit 6ce1a72
BenchmarksBenchmark execution time: 2026-10-27 18:37:54 Comparing candidate commit c74b792 in PR branch Found 3 performance improvements and 0 performance regressions! Performance is the same for 67 metrics, 2 unstable metrics, 11 known flaky benchmarks, 115 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (9465) and master. ✅ No regressions detected |
|
@andrewlock Hi Andrew, I would greatly if you could take another look at the PR. Turns out I was missing some logs hence the increase in lines, apologies! |
Log setup, configuration delivery, readiness, evaluation and shutdown details under DD_TRACE_DEBUG so customers can diagnose why flags do not resolve. Evaluation logs omit the value and targeting context and use the structured error code. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An offline source resolves Enabled to false, so Create returned before the offline diagnostic in Activate could run and told customers to set DD_FEATURE_FLAGS_ENABLED=true, which cannot enable an offline source. Report the offline source from Create instead and drop the unreachable case. Environment: Datadog workspace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vironment changes Every settings change reaches UpdateEnvironment, so compare the normalized environment first and skip building the request URI when it is unchanged. Also pass the initialization failure to the logger as an exception. Environment: Datadog workspace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stics Debug logs now include raw evaluation inputs and outputs, usable and rejected flag counts, retained configuration on failed refreshes, exposure queue and transport outcomes, and shutdown. OpenFeature structure values are logged by type name, and rejected flags are listed without a reason, to keep the parser and model unchanged. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
caf523d to
9d50136
Compare
|
@andrewlock Seeking your review once more for an approval. TIA! |
Dispose() does not wait for disposal to finish. In agentless mode the evaluation writer closes on a thread-pool thread, so "shutdown complete" could be logged after the assertion ran, which made the agentless/throwing-sink case flaky. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary of changes
Adds Feature Flags diagnostics for setup, configuration delivery, provider readiness, evaluation, and exposure delivery. With
DD_TRACE_DEBUG=true, logs show the inputs and results needed to explain why a flag resolved to a particular value or default.Reason for change
A generic initialization timeout or default value does not explain whether configuration is unavailable, a flag was rejected, targeting did not match, or exposure delivery failed.
Implementation details
G17/G9for floating-point values and JSON escaping for strings and map keys. Unsupported objects are represented by type-name placeholders without reflecting over their properties; formatting and logging failures do not change evaluation results.CompareExchangefor the once-per-process warning.Test coverage
git diff --checkpassed.Other details
Feature Flags debug logging and troubleshooting documentation will move to docs.datadoghq.com. The troubleshooting section is removed from the package README and is not added to the development guide.
FFE reviewer selection
Reviewers: @btthomas, @typotter
Why: Guided and observable onboarding — The PR adds local debug logging to the .NET Feature Flags SDK so customers can tell what happened during setup. Reviewers come from the matched pod.
🤖 Automated selection.
Selection details
Initiative: project / guided-onboarding
Why this match: The PR adds local debug logging to the .NET Feature Flags SDK so customers can tell what happened during setup. It logs the enabled or disabled state with remediation hints (for example, set DD_FEATURE_FLAGS_ENABLED=true), the configuration source, agentless polling and retries, configuration receipt with applied and rejected flags, the initialization or provider-readiness outcome including timeouts, the inputs and results of each evaluation, and exposure delivery failures. This is the catalog's 'SDK startup/lifecycle telemetry and local debug logging' for distinguishing not observed from failed across initialization, readiness, configuration receipt and first evaluation. Agentless, EVP and exposure files only gain diagnostics; their transport and delivery behavior is not changed.
The PR author was excluded. Existing reviewers and teams were preserved.
Debug or fix a problem
Workflow run · Bits Code session
dry_run=false. Unchanged completed runs are skipped. If the receipt saysneeds_reconciliationor a write outcome is uncertain, ask the workflow owner to reconcile GitHub and the receipt before retrying; do not delete the lock blindly.Evidence and run details
✅ Complete — reviewer coverage verified. The workflow checked pending requests or submitted reviews on the evaluated head.
Generated asynchronously by the FFE reviewer-routing workflow.
Changed paths:
tracer/src/Datadog.Trace/FeatureFlags/FeatureFlagsDiagnostics.cs,tracer/src/Datadog.Trace/FeatureFlags/FeatureFlagsModule.cs,tracer/src/Datadog.Trace/FeatureFlags/Agentless/AgentlessConfigurationSource.cs,tracer/src/Datadog.Trace/FeatureFlags/Rcm/FfeProduct.cs,tracer/src/Datadog.Trace/FeatureFlags/FeatureFlagsEvaluator.cs,tracer/src/Datadog.Trace/FeatureFlags/Exposure/ExposureApi.cs,tracer/src/Datadog.Trace/FeatureFlags/Evp/FeatureFlagsEvpTransport.csEvaluated head:
9d50136c107c5bdfc5a9483e07f64015768b603fRegistry revision:
revision:1946aa2a-530e-487a-84a7-83aff44a1089Pinned skill source:
d214cfc65ae154b97d39af5cf32caf48aaec9bf0Instructions: workflow-injected snapshot (no plugin loaded)
Instruction snapshot SHA-256:
f23b2a88c13c0da90e2dd58246a14f257af91e2195c555039bd555b52e6f3516