Repository navigation
feat(openfeature): improve feature flag debug logging - #10889
ethan-romero-dg wants to merge 1 commit into
Conversation
Make DD_TRACE_DEBUG output explain a flag result end to end: - Setup: log the provider's configuration source, SDK env and init timeout; the agentless endpoint kind, poll interval, request timeout and whether the API key header is sent; warn when remote_config is selected while Remote Configuration is disabled. - Delivery: log agentless retry delays, terminal poll failures, whether the prior configuration is kept, recovery, and the delivered configuration identity (environment, createdAt, ETag or RC id, requested dd_env). - Readiness: log the initialization wait and elapsed time, and recovery after a timeout or a removed configuration. - Evaluation: log the flag key, type, default, merged context and final details without inspect truncation, the provider resolution when a later hook replaced it, and the configuration observed at logging time. Warn once that these logs contain raw evaluation data. - Exposures: report accepted batches as receiver acceptance, failed batches as dropped, and pending events queued on enable or dropped at shutdown; redact request errors. Lazy log callbacks fall back to a fixed message when formatting fails, so diagnostics never prevent configuration from being applied. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@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. Nice work! 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". |
BenchmarksBenchmark execution time: 2026-10-22 15:53:12 Comparing candidate commit 8804bb4 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2387 metrics, 16 unstable metrics.
|
There was a problem hiding this comment.
More details
Full OpenFeature execution remains unverified because dependencies and generated vendor bundles were unavailable. The completed static review raised no reportable concern, and human PR discussion supplied no additional technical context.
🤖 Bits Code Review · Commit 8804bb4
What does this PR do?
Fills gaps in the Feature Flags
DD_TRACE_DEBUGoutput, so a customer can follow a flag result from setup to delivery.remote_configis selected but Remote Configuration is disabled. Logs when feature flagging is disabled.dd_env, and the delivered configuration environment separately, and includescreatedAtwith the ETag or Remote Config ID. Remote Config failures to apply are logged before being rethrown.finallyhook, withoututil.inspectdepth or length limits and without invoking custom inspectors. Logs the provider resolution separately when a later hook replaced it, and labels configuration identity as "observed at logging time". A one-time warning says these logs contain raw, possibly sensitive data.docs/API.md.Lazy log callbacks fall back to a fixed message when formatting fails, so diagnostics can't prevent configuration from being applied.
Motivation
FFL-3409. Brings Node.js in line with the cross-SDK debug-logging scenario matrix, where
DD_TRACE_DEBUGshould expose raw evaluation inputs and outputs and explain configuration delivery, readiness, and exposure outcomes.Additional Notes
Testing
npm run test:openfeature: 766 passing.log.spec.jsandproxy.spec.js: 156 passing.integration-tests/openfeature/openfeature-worker-logging.spec.js: 3 passing. Lint is clean.ffe-dogfooding, local tarball, staging CDN and Agent Remote Config), evaluating all flag types, the experiment flag, and a missing flag:DD_TRACE_LOG_LEVEL=warn: no evaluation lines and no raw-data warning.Known gaps, not addressed here
log/writer.js. It should be a separate change for the log owners.route.url.origin, which printsnullfor Unix-socket Agent URLs and omits the endpoint path.beforeExithandler, which doesn't run on SIGTERM orprocess.exit().OpenFeature.close()doesn't flush exposures.doLog=false): the upstream provider returns silently.initialize().🤖 Generated with Claude Code