Commit ef19035
appsec: assert app-extended-heartbeat re-emits full telemetry state
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>1 parent 29c8781 commit ef19035
6 files changed
Lines changed: 180 additions & 15 deletions
File tree
- appsec/tests/integration/src
- main/groovy/com/datadog/appsec/php
- docker
- test
- groovy/com/datadog/appsec/php/integration
- www/base/public
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 72 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
22 | 43 | | |
23 | 44 | | |
24 | 45 | | |
| |||
361 | 382 | | |
362 | 383 | | |
363 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
364 | 398 | | |
365 | 399 | | |
366 | 400 | | |
| |||
399 | 433 | | |
400 | 434 | | |
401 | 435 | | |
402 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
403 | 440 | | |
404 | 441 | | |
405 | 442 | | |
| |||
422 | 459 | | |
423 | 460 | | |
424 | 461 | | |
425 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
426 | 467 | | |
427 | 468 | | |
428 | 469 | | |
429 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
430 | 474 | | |
431 | 475 | | |
432 | 476 | | |
433 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
434 | 481 | | |
435 | 482 | | |
436 | 483 | | |
437 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
438 | 488 | | |
439 | 489 | | |
440 | 490 | | |
441 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
442 | 502 | | |
443 | 503 | | |
444 | 504 | | |
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
Lines changed: 102 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
Submodule libdatadog updated 34 files
- .codecov.yml+4
- .github/CODEOWNERS+1
- .github/labeler.yml+6
- Cargo.lock+40-14
- Cargo.toml+2-1
- LICENSE-3rdparty.csv+1
- benchmark/run_benchmarks_ci.sh+1-1
- libdd-common/src/lib.rs+46-1
- libdd-crashtracker/Cargo.toml+1-1
- libdd-data-pipeline/Cargo.toml+1-1
- libdd-profiling/src/collections/string_table/error.rs+10
- libdd-profiling/src/internal/profile/mod.rs+4-4
- libdd-sampling/Cargo.toml+37
- libdd-sampling/benches/sampling_bench.rs+438
- libdd-sampling/src/agent_service_sampler.rs+53
- libdd-sampling/src/constants.rs+48
- libdd-sampling/src/datadog_sampler.rs+1.5k
- libdd-sampling/src/dd_constants.rs+31
- libdd-sampling/src/dd_sampling.rs+408
- libdd-sampling/src/glob_matcher.rs+234
- libdd-sampling/src/lib.rs+51
- libdd-sampling/src/rate_limiter.rs+392
- libdd-sampling/src/rate_sampler.rs+203
- libdd-sampling/src/rules_sampler.rs+50
- libdd-sampling/src/sampling_rule.rs+630
- libdd-sampling/src/sampling_rule_config.rs+256
- libdd-sampling/src/types.rs+169
- libdd-sampling/src/v04_span.rs+550
- libdd-telemetry/Cargo.toml+1-1
- libdd-telemetry/examples/tm-ping.rs+2
- libdd-telemetry/src/data/payload.rs+10-2
- libdd-telemetry/src/data/payloads.rs+2
- libdd-telemetry/src/worker/mod.rs+4
- tools/docker/Dockerfile.build+1
0 commit comments