appsec: assert app-extended-heartbeat re-emits full telemetry state#3865
Open
cataphract wants to merge 1 commit intomasterfrom
Open
appsec: assert app-extended-heartbeat re-emits full telemetry state#3865cataphract wants to merge 1 commit intomasterfrom
cataphract wants to merge 1 commit intomasterfrom
Conversation
Updates libdatadog to a version that includes dependencies and integrations
in app-extended-heartbeat. The previous behaviour omitted those fields and
caused a duplicate app-integrations-change / app-dependencies-loaded on the
next regular flush.
Adds an integration test (TelemetryExtendedHeartbeatTests) that drives
phpredis and exec via custom_integrations.php and asserts:
1. They appear in a regular app-started/app-integrations-change.
2. The next app-extended-heartbeat re-emits configuration, dependencies,
and integrations (with phpredis present).
3. Loading a fresh integration afterwards produces an
app-integrations-change containing only the new integration —
phpredis is not re-emitted, confirming the leak is fixed.
The new test runs in its own container so DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL=15
applies before the worker spawns. The existing TelemetryTests no longer
sets that env var, so its 24h default no longer interferes with tests
that are not about the extended heartbeat (this addresses the intermittent
'telemetry reflects the loading of a new integration' failure caused by
the heartbeat re-queueing data into the next regular flush).
Folds two helpers into TelemetryHelpers:
- filterMessages(...) gains a userAppOnly flag (default true) that
skips the sidecar's own datadog-ipc-helper telemetry worker.
- WithExtendedHeartbeat / waitForExtendedHeartbeat mirror the existing
WithIntegrations / waitForIntegrations pattern.
custom_integrations.php gains an "fs" branch (fopen on /dev/null) so
tests can trigger the filesystem deferred-loading hook.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 987505e92c
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
✨ Fix all issues with BitsAI or with Cursor
|
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.
Updates libdatadog to a version that includes dependencies and integrations in app-extended-heartbeat. The previous behaviour omitted those fields and caused a duplicate app-integrations-change on the next regular flush.
Adds an integration test (TelemetryExtendedHeartbeatTests) that drives phpredis and exec via custom_integrations.php and asserts:
The new test runs in its own container so DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL=15 applies before the worker spawns. The existing TelemetryTests no longer sets that env var, so its 24h default no longer interferes with tests that are not about the extended heartbeat (this addresses the intermittent 'telemetry reflects the loading of a new integration' failure caused by the heartbeat re-queueing data into the next regular flush).
Folds two helpers into TelemetryHelpers:
custom_integrations.php gains an "fs" branch (fopen on /dev/null) so tests can trigger the filesystem deferred-loading hook.
Description
Reviewer checklist