Skip to content

feat(telemetry): report AppSec remote activation changes - #465

Merged
e-n-0 merged 14 commits into
masterfrom
flavien.darche/appsec-telemetry-product-change
Oct 13, 2026
Merged

e-n-0 merged 14 commits into
masterfrom
flavien.darche/appsec-telemetry-product-change

Conversation

@e-n-0

@e-n-0 e-n-0 commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

🎯 Motivation

Stacked on #426 feat(telemetry): report AppSec state at startup

When AppSec activation is left to remote config, #426 reports enabled: false in app-started,
and nothing is sent once remote config turns AppSec on.
This was raised in the #426 review.
DataDog/dd-trace-cpp#383 adds telemetry::capture_product_change() so the module can report the later change.

📋 Summary

  • When an ASM_FEATURES update changes the AppSec state, the module now sends the new state as an app-product-change event with the next telemetry heartbeat.
    Updates that do not change the state send nothing.
  • The dd-trace-cpp submodule moves to the merge commit of feat(telemetry): add app-product-change support dd-trace-cpp#383 on main.
  • Tests: a new integration test turns AppSec on and then off through remote config,
    and checks that the mock agent receives app-product-change with appsec.enabled set to true, then false.
    Its nginx config sets a 1 second telemetry heartbeat, so the test does not wait long.

e-n-0 and others added 5 commits October 2, 2026 16:54
Co-authored-by: datadog-bits <263423550+datadog-bits@users.noreply.github.com>
Co-authored-by: datadog-bits <263423550+datadog-bits@users.noreply.github.com>
When remote config turns AppSec on or off, send the new state with telemetry::capture_product_change() from dd-trace-cpp. Pin dd-trace-cpp to the commit that adds this API (DataDog/dd-trace-cpp#383).
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 69.23% (+0.09%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0436477 | Docs | View more details | Give us feedback!

drop_cfg() waits for the remote config ack and discards agent log lines read in the meantime. The app-product-change event could be discarded there. Apply the empty config and wait for the telemetry event instead.
@e-n-0
e-n-0 marked this pull request as ready for review October 12, 2026 12:37
@e-n-0
e-n-0 requested review from a team as code owners October 12, 2026 12:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T12:44:30.719785Z cfd1580 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.

Comment thread dd-trace-cpp Resolved
Comment thread src/security/waf_remote_cfg.cpp Resolved
Comment thread test/docker-compose.yml Resolved
Set DD_TELEMETRY_HEARTBEAT_INTERVAL with an nginx env directive in a config only the telemetry test loads, so other tests do not log telemetry every second. Wait 5 seconds instead of 30 for app-product-change.
@e-n-0
e-n-0 requested a review from cataphract October 13, 2026 14:35

@cataphract cataphract left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

Base automatically changed from flavien.darche/appsec-telemetry-product-state to master October 13, 2026 14:44
@e-n-0
e-n-0 merged commit 77ee6d2 into master Oct 13, 2026
213 checks passed
@e-n-0
e-n-0 deleted the flavien.darche/appsec-telemetry-product-change branch October 13, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants