Skip to content

Add agent debug logging for feature flag onboarding - #13091

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits into
masterfrom
ethan.romero/FFL-3401/ffe-agent-diagnostics
Oct 27, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits into
masterfrom
ethan.romero/FFL-3401/ffe-agent-diagnostics

Conversation

@ethan-romero-dg

@ethan-romero-dg ethan-romero-dg commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Adds DEBUG logs to the agent side of Feature Flagging:

  • FeatureFlaggingSystem: logs that the product is enabled (with the environment) and, if the backend fails to start, the type of the failure.
  • RemoteConfigServiceImpl: logs when the Remote Configuration source starts and stops, and every document it receives or sees removed (config key and size, never the content). The log comes after the subscribers are notified, so it can never get in the way of a delivery.

Tests in RemoteConfigServiceImplTest cover the lifecycle and document logs, and check with a subscriber that a document is logged only after it is delivered.

Motivation

Onboarding diagnostics for feature flags (FFL-3401), following the SDK logging checklist.

Since #12844 the agent only forwards the raw Remote Configuration documents and the dd-openfeature SDK parses and evaluates them, so the agent-side logging is small. The matching SDK diagnostics are in the stacked PR that targets this branch.

Additional Notes

Contributor Checklist

Jira ticket: FFL-3401

🤖 Generated with Claude Code

ethan-romero-dg and others added 7 commits October 27, 2026 15:01
Replace the DiagnosticLogger wrappers with plain SLF4J loggers. Agent-side
code logs through the tracer's internal logger, so it needs no isolation
wrapper. The provider keeps isolation where an application logging backend
is involved: debug diagnostics go through debugQuietly and DebugLoggingHook,
which cache DD_TRACE_DEBUG and swallow logging and formatting failures.

- Warn at provider construction when DD_TRACE_DEBUG is enabled but the
  application logger blocks DEBUG for datadog.trace.api.openfeature.
- Report flags=missing for Remote Config payloads without a flags member,
  separately from an empty configuration.
- Drop the racy inFlight shutdown field and the duplicate parser summary.
- Update the README to match.

Environment: Datadog workspace

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Assert the debug logs that the Remote Configuration service emits when
it starts, stops, receives a document and sees it removed.

Environment: Datadog workspace

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Move the received and removed logs of the Remote Configuration service
after the subscribers are notified, so that a failing logging backend
cannot keep a configuration document from being delivered.

Environment: Datadog workspace

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Assert, with a subscriber, that the received log of the Remote
Configuration service comes after the document is delivered.

Environment: Datadog workspace

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ethan-romero-dg ethan-romero-dg added type: feature Enhancements and improvements tag: diagnostics Diagnostics related changes tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature labels Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

@ethan-romero-dg

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T20:13:51.061201Z e71a07a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: e71a07a424

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@ethan-romero-dg
ethan-romero-dg marked this pull request as ready for review October 27, 2026 20:11
@ethan-romero-dg
ethan-romero-dg requested a review from a team as a code owner October 27, 2026 20:11
@datadog-prod-us1-6

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.97 s 13.94 s [-0.6%; +1.0%] (no difference)
startup:insecure-bank:tracing:Agent 12.80 s 12.96 s [-1.8%; -0.6%] (maybe better)
startup:petclinic:appsec:Agent 17.18 s 17.07 s [-0.3%; +1.5%] (no difference)
startup:petclinic:iast:Agent 16.51 s 16.56 s [-6.6%; +6.0%] (unstable)
startup:petclinic:profiling:Agent 16.85 s 16.94 s [-1.7%; +0.6%] (no difference)
startup:petclinic:sca:Agent 17.05 s 16.81 s [+0.5%; +2.3%] (maybe worse)
startup:petclinic:tracing:Agent 16.24 s 16.16 s [-0.5%; +1.5%] (no difference)

Commit: e71a07a4 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@datadog-prod-us1-6 datadog-prod-us1-6 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Document diagnostics preserve subscriber delivery order and safely handle null removal events. The completed static review identified no actionable defects.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit e71a07a

@ethan-romero-dg
ethan-romero-dg added this pull request to the merge queue Oct 27, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-27 21:23:01 UTC ℹ️ Start processing command /merge


2026-10-27 21:23:05 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-10-27 22:41:40 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 27, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 5ca1c1f into master Oct 27, 2026
632 of 639 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the ethan.romero/FFL-3401/ffe-agent-diagnostics branch October 27, 2026 22:41
@github-actions github-actions Bot added this to the 1.69.0 milestone Oct 27, 2026
PerfectSlayer added a commit that referenced this pull request Oct 28, 2026
Port #13091 from master: log the Feature Flagging system start and
initialization failure, and the Remote Configuration source lifecycle and
documents, once they are delivered.
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 tag: diagnostics Diagnostics related changes type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants