Repository navigation
feat(telemetry): report AppSec remote activation changes - #465
Merged
Merged
Conversation
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).
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 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
marked this pull request as ready for review
October 12, 2026 12:37
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. |
xlamorlette-datadog
requested changes
Oct 12, 2026
Use the squash-merge commit of DataDog/dd-trace-cpp#383 on main.
Earlier tests now leave app-product-change lines in the agent log queue.
The mock agent now logs telemetry requests, so tests can read them.
…vien.darche/appsec-telemetry-product-change
xlamorlette-datadog
approved these changes
Oct 12, 2026
cataphract
reviewed
Oct 13, 2026
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.
Base automatically changed from
flavien.darche/appsec-telemetry-product-state
to
master
October 13, 2026 14:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Motivation
When AppSec activation is left to remote config, #426 reports
enabled: falseinapp-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
ASM_FEATURESupdate changes the AppSec state, the module now sends the new state as anapp-product-changeevent with the next telemetry heartbeat.Updates that do not change the state send nothing.
and checks that the mock agent receives
app-product-changewithappsec.enabledset totrue, thenfalse.Its nginx config sets a 1 second telemetry heartbeat, so the test does not wait long.