Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3548 +/- ##
==========================================
- Coverage 62.24% 62.11% -0.14%
==========================================
Files 141 141
Lines 13387 13387
Branches 1753 1753
==========================================
- Hits 8333 8315 -18
- Misses 4257 4273 +16
- Partials 797 799 +2 see 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Benchmarks [ tracer ]Benchmark execution time: 2026-02-04 16:05:38 Comparing candidate commit ffeafcb in PR branch Found 0 performance improvements and 9 performance regressions! Performance is the same for 181 metrics, 4 unstable metrics. scenario:PDOBench/benchPDOOverhead
scenario:PDOBench/benchPDOOverheadWithDBM
scenario:PHPRedisBench/benchRedisOverhead
scenario:SymfonyBench/benchSymfonyOverhead
scenario:SymfonyBench/benchSymfonyOverhead-opcache
scenario:WordPressBench/benchWordPressDdprof
scenario:WordPressBench/benchWordPressDdprof-opcache
scenario:WordPressBench/benchWordPressOverhead
scenario:WordPressBench/benchWordPressOverhead-opcache
|
be10f87 to
4dd7002
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f84f03e8c
ℹ️ 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".
components-rs/telemetry.rs
Outdated
| ) -> bool { | ||
| let cache_entry = ddog_sidecar_telemetry_cache_get_or_update(cache, service, env); | ||
| let result = cache_entry.last_endpoints_push.elapsed().map_or(false, |d| d < Duration::from_secs(60)); // 1 minute |
There was a problem hiding this comment.
Keep endpoint collection from expiring after 60s
This predicate only treats endpoints as “collected” for 60 seconds (elapsed() < 60s), so in long‑running PHP workers the Symfony/Laravel/WordPress hooks will start re‑enumerating routes/posts and re‑emitting app‑endpoints after a minute. That contradicts the “collect once” behavior and can create duplicate telemetry plus repeated route/DB scans on every request once the minute elapses.
Useful? React with 👍 / 👎.
appsec/tests/integration/src/main/groovy/com/datadog/appsec/php/TelemetryHelpers.groovy
Show resolved
Hide resolved
7f84f03 to
4bdf65f
Compare
|
675114b to
c5a5e84
Compare
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. If you need to update snapshots, please refer to CONTRIBUTING.md 1 occurrences of : - "error.message": "Thrown Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException in {path}/tests/Frameworks/Symfony/Version_2_3/app/cache/prod/appProdUrlMatcher.php:60"
+ "error.message": "Thrown Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException in {path}/tests/Frameworks/Symfony/Version_2_3/app/cache/prod/appProdUrlMatcher.php:65"
1 occurrences of : - "error.message": "Thrown Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException in {path}/tests/Frameworks/Symfony/Version_2_8/app/cache/prod/appProdProjectContainerUrlMatcher.php:62"
+ "error.message": "Thrown Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException in {path}/tests/Frameworks/Symfony/Version_2_8/app/cache/prod/appProdProjectContainerUrlMatcher.php:67"
|
8bdf101 to
78b097a
Compare
...c/tests/integration/src/test/groovy/com/datadog/appsec/php/integration/Laravel8xTests.groovy
Outdated
Show resolved
Hide resolved
...c/tests/integration/src/test/groovy/com/datadog/appsec/php/integration/Symfony62Tests.groovy
Outdated
Show resolved
Hide resolved
64d9505 to
7a511a5
Compare
|
if the alpine thing continues to fail and you can't configure the rust getrandom crate not to use the symbol, you can try to provide the symbol as done here: https://github.com/DataDog/nginx-datadog/blob/master/build_env/glibc_compat.c#L200-L227 |
849a92d to
b1c51ed
Compare
1571560 to
0c21a75
Compare
0c21a75 to
9164b2a
Compare
| // Provide a weak, local fallback so that: | ||
| // - On older libcs without getrandom, we satisfy the symbol at runtime. | ||
| // - On newer libcs, libc's strong symbol may be preferred by the runtime loader. | ||
| __attribute__((weak)) ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) { |
There was a problem hiding this comment.
@bwoebi would you mind to have a look at this? I had to add it because the version of libdatadog used by this brach was calling getrandom and in some old alpine version it was not present
There was a problem hiding this comment.
Looks good to me. It's basically what we have for nginx-datadog. You could probably call syscall, but this also supports Linux < 3.17
* Adds process tags to profiler uploader * remove useless utils function * remove empty lines and fix spelling * add function to ddtrace.sym * feat(CI: installer tests): fix installer tests by changing enabling check on appsec extension (#3604) Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> * refactor(profiling): use module globals for ZMM state (#3608) * refactor(profiling): use module globals for ZMM state * style: fix clippy warnings * Apply suggestions from code review Co-authored-by: Florian Engelhardt <florian.engelhardt@datadoghq.com> * docs: note ZTS vs NTS differences --------- Co-authored-by: Florian Engelhardt <florian.engelhardt@datadoghq.com> * refactor(profiling): extract Backtrace type (#3612) * refactor(profiling): extract Backtrace type In a future change, this may hold a refcount for another object, so we need to encapsulate it. * fix `test_collect_stack_sample` not running --------- Co-authored-by: Florian Engelhardt <florian.engelhardt@datadoghq.com> * Propagate RELIABILITY_ENV_BRANCH to downstream pipeline (#3605) * Add simple_onboarding_appsec to SSI system tests (#3617) * Stores remote config requests in request-replayer (#3585) * feat(profiling): internal metrics for overhead (#3616) * feat(profiling): internal metrics for overhead * feat(profiling): move CPU time capture to include serialization for `ddprof_upload` for current profile exported Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(profiling): add CPU time tracking for `ddprof_time` thread Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(profiling): separate CPU time tracking per background thread Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Florian Engelhardt <florian.engelhardt@datadoghq.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix(tracing): hook is_internal was backwards (#3625) * Fix phpt asm standalone tests (#3628) * fix readme file links (#3610) * test(language-tests): properly skip online tests and disabled soap_qname_crash.phpt on all version (#3632) Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> * Collect framework endpoints (#3548) * Only run publishing jobs when all dependent pipelines succeed (#3635) Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com> * chore(profiling): update libdatadog to 26 (#3633) * test(CI): manually handle git operation for windows jobs (#3634) * test(CI): add aggressive git cleanup on windows runner Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> * test(CI): add manual cleanup in before_script step Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> --------- Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> * feat(CI): add healthcheck to SQLSRV server setup (#3619) * feat(CI): add healthcheck to SQLSRV server setup Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> * chore: add troubleshooting script for SQLSRV Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> * feat: add explicit memory limit and paths Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> * chore: replace sqlsrv docker image Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> --------- Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> * fix(CI: test_metrics): add explicit flush in logging (#3637) * fix(logging): fsync crash logs before _Exit() to prevent data loss When a SIGSEGV occurs, the signal handler logs "Segmentation fault encountered" and then calls _Exit() which terminates the process immediately. Without fsync(), kernel write buffers may not be flushed to disk before termination, causing a race condition where the error log file is sometimes not created. This fix adds fsync() on Unix/Linux and _commit() on Windows after write() in ddtrace_log_with_time() to ensure crash logs persist to disk before process termination. The issue affects production (rare but possible during power loss, kernel panic, or I/O errors) and causes consistent test failures where tests check for log files immediately after crashes (before kernel writeback completes). Fixes flaky test_metrics SigSegVTest::testGet failures on Kubernetes where dd_php_error.log was not being created consistently. * fix(signals): move flush in sigsegv handler Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> --------- Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> * Adds process_tags to live debugger payloads (#3580) * init process tags for APM Co-Authored-By: PROFeNoM <alexandre.choura@datadoghq.com> * feat(process_tags): add process_tags to tracing payloads * small auto review and fix test * bwoebi review * fix test * Adds process_tags to live debugger payloads * temporary libdatadog bump * auto review * bump libdatadog * fix build * update makefile && make cbindgen * fixing test * fixing test * fix appsec tests --------- Co-authored-by: PROFeNoM <alexandre.choura@datadoghq.com> * chore(profiling): update libdatadog 26 to 27 (#3640) * chore(profiling): update libdatadog 26 to 27 * process tags were removed while rebasing to sign commit --------- Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com> Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com> Co-authored-by: Florian Engelhardt <florian.engelhardt@datadoghq.com> Co-authored-by: Alexandre Rulleau <55387832+Leiyks@users.noreply.github.com> Co-authored-by: Levi Morrison <levi.morrison@datadoghq.com> Co-authored-by: Laplie Anderson <randomanderson@users.noreply.github.com> Co-authored-by: Alejandro Estringana Ruiz <alejandro.estringanaruiz@datadoghq.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Bob Weinand <bob.weinand@datadoghq.com> Co-authored-by: PROFeNoM <alexandre.choura@datadoghq.com>
Description
This feature will collect(once) all endpoints of the following framework: symfony(except version 4), laravel and wordpress
Reviewer checklist