Skip to content

feat(telemetry): report AppSec state at startup - #459

Merged
e-n-0 merged 3 commits into
flavien.darche/appsec-telemetry-product-statefrom
dd/flavien-darche/appsec-telemetry-product-state
Oct 5, 2026
Merged

e-n-0 merged 3 commits into
flavien.darche/appsec-telemetry-product-statefrom
dd/flavien-darche/appsec-telemetry-product-state

Conversation

@e-n-0

@e-n-0 e-n-0 commented Oct 5, 2026

Copy link
Copy Markdown
Member

Summary

Report the actual AppSec state in startup telemetry for WAF-enabled builds. AppSec starts inactive until initialization enables it, consistent with the Go and Python tracers. Address review feedback by making product metadata explicit and reducing the size of make_tracer().

Changes

  • Register the AppSec product in app-started telemetry using security::Library::active() and the nginx module version.
  • Default security::Library::active_ to false and retain the explicit-disable reset.
  • Use designated initializers for the AppSec product metadata.
  • Extract product registration and remote configuration setup into configure_appsec(), retaining the WITH_WAF guard, call order, and existing subscription conditions.
  • The existing dd-trace-cpp v2.3.0 pin already includes the serialization fix from dd-trace-cpp#366; no dependency bump is needed.

Testing

  • Formatting check passed for src/tracing_library.cpp using the pinned C++ tracer's formatting rules.
  • The designated product initializer passed a C++20 syntax check against the pinned dd-trace-cpp headers. This check does not compile the complete nginx module.
  • Reviewed the extracted configuration logic against the previous implementation; fields, registration order, and RC subscription conditions are preserved.
  • Native module build and unit/integration tests were not rerun: the required native dependency sources are unavailable in this sandbox.

Remote activation: decision pending

Startup telemetry correctly reports AppSec as inactive while awaiting RC activation. The nginx RC callback already changes Library::active(), but later telemetry product updates remain unimplemented. Go and Python emit app-product-change events; neither the pinned nor the attached current C++ tracer exposes the equivalent API.

Recommendation: require upstream dd-trace-cpp app-product-change support and wire it into RC activation/deactivation before merging PR #426. Startup-only reporting with explicitly deferred RC updates is an alternative requiring a maintainer decision. This follow-up addresses the two cleanup requests and leaves that decision open.


PR by Bits - View session in Datadog

Comment @DataDog to request changes

datadog-bits and others added 3 commits October 5, 2026 09:26
Co-authored-by: e-n-0 <11708575+e-n-0@users.noreply.github.com>
…product-state' into flavien.darche/appsec-telemetry-product-state

Co-authored-by: e-n-0 <11708575+e-n-0@users.noreply.github.com>
Co-authored-by: e-n-0 <11708575+e-n-0@users.noreply.github.com>
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

View session in Datadog

Bits Code status: ✅ Done

Comment @DataDog to request changes

@e-n-0 e-n-0 added the Bits AI label Oct 5, 2026
@e-n-0
e-n-0 changed the base branch from master to flavien.darche/appsec-telemetry-product-state October 5, 2026 15:27
@e-n-0
e-n-0 marked this pull request as ready for review October 5, 2026 15:27
@e-n-0
e-n-0 requested a review from a team as a code owner October 5, 2026 15:27
@e-n-0
e-n-0 merged commit 1b180a2 into flavien.darche/appsec-telemetry-product-state Oct 5, 2026
1 of 3 checks passed
@e-n-0
e-n-0 deleted the dd/flavien-darche/appsec-telemetry-product-state branch October 5, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants