Skip to content

Collect framework endpoints#3548

Merged
estringana merged 16 commits intomasterfrom
estringana/collect-framework-endpoints-2
Feb 10, 2026
Merged

Collect framework endpoints#3548
estringana merged 16 commits intomasterfrom
estringana/collect-framework-endpoints-2

Conversation

@estringana
Copy link
Contributor

@estringana estringana commented Dec 24, 2025

Description

This feature will collect(once) all endpoints of the following framework: symfony(except version 4), laravel and wordpress

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@codecov-commenter
Copy link

codecov-commenter commented Dec 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.11%. Comparing base (21d2f00) to head (fdf47cf).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21d2f00...fdf47cf. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Dec 30, 2025

Benchmarks [ tracer ]

Benchmark execution time: 2026-02-04 16:05:38

Comparing candidate commit ffeafcb in PR branch estringana/collect-framework-endpoints-2 with baseline commit 21d2f00 in branch master.

Found 0 performance improvements and 9 performance regressions! Performance is the same for 181 metrics, 4 unstable metrics.

scenario:PDOBench/benchPDOOverhead

  • 🟥 execution_time [+5.927µs; +10.694µs] or [+2.711%; +4.891%]

scenario:PDOBench/benchPDOOverheadWithDBM

  • 🟥 execution_time [+7.544µs; +11.329µs] or [+3.480%; +5.225%]

scenario:PHPRedisBench/benchRedisOverhead

  • 🟥 execution_time [+35.509µs; +47.549µs] or [+4.239%; +5.677%]

scenario:SymfonyBench/benchSymfonyOverhead

  • 🟥 execution_time [+259.490µs; +376.410µs] or [+3.256%; +4.723%]

scenario:SymfonyBench/benchSymfonyOverhead-opcache

  • 🟥 execution_time [+277.599µs; +381.321µs] or [+3.469%; +4.765%]

scenario:WordPressBench/benchWordPressDdprof

  • 🟥 execution_time [+2.086ms; +2.240ms] or [+7.120%; +7.646%]

scenario:WordPressBench/benchWordPressDdprof-opcache

  • 🟥 execution_time [+2.033ms; +2.185ms] or [+6.934%; +7.451%]

scenario:WordPressBench/benchWordPressOverhead

  • 🟥 execution_time [+2.112ms; +2.327ms] or [+7.750%; +8.540%]

scenario:WordPressBench/benchWordPressOverhead-opcache

  • 🟥 execution_time [+2.104ms; +2.405ms] or [+7.687%; +8.787%]

@estringana estringana force-pushed the estringana/collect-framework-endpoints-2 branch from be10f87 to 4dd7002 Compare January 2, 2026 11:38
@estringana estringana changed the title Estringana/collect framework endpoints 2 Collect framework endpoints Jan 8, 2026
@estringana estringana requested a review from cataphract January 8, 2026 09:18
@estringana estringana marked this pull request as ready for review January 8, 2026 11:30
@estringana estringana requested review from a team as code owners January 8, 2026 11:30
@cataphract
Copy link
Contributor

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines 372 to 374
) -> 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@estringana estringana force-pushed the estringana/collect-framework-endpoints-2 branch from 7f84f03 to 4bdf65f Compare January 13, 2026 09:46
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 13, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 2 New flaky tests detected

Endpoints are sent() from com.datadog.appsec.php.integration.Laravel8xTests (Datadog) (Fix with Cursor)
Assertion failed: 

assert endpoints.size() == 6
       |         |      |
       |         1      false
       [com.datadog.appsec.php.TelemetryHelpers$Endpoint@2f0cab82]

Assertion failed: 

assert endpoints.size() == 6
...
Endpoints are sent() from com.datadog.appsec.php.integration.Symfony62Tests (Datadog) (Fix with Cursor)
Assertion failed: 

assert endpoints.size() == 6
       |         |      |
       |         1      false
       [com.datadog.appsec.php.TelemetryHelpers$Endpoint@3359c3f6]

Assertion failed: 

assert endpoints.size() == 6
...

🧪 1024 Tests failed

    testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Fix with Cursor)

    testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Fix with Cursor)

testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 698377c3000000002b9c3de84f3c5b79
tid: 698377c300000000
hexProcessTraceId: 2b9c3de84f3c5b79
hexProcessSpanId: 753b95d000eb0a5d
processTraceId: 3142454707968826233
processSpanId: 8447510246664637021
View all
This comment will be updated automatically if new data arrives.
🔗 Commit SHA: fdf47cf | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@estringana estringana force-pushed the estringana/collect-framework-endpoints-2 branch 3 times, most recently from 675114b to c5a5e84 Compare January 26, 2026 14:27
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

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"

@estringana estringana force-pushed the estringana/collect-framework-endpoints-2 branch from 8bdf101 to 78b097a Compare January 27, 2026 09:11
@estringana estringana force-pushed the estringana/collect-framework-endpoints-2 branch 3 times, most recently from 64d9505 to 7a511a5 Compare January 28, 2026 11:10
@cataphract
Copy link
Contributor

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

@estringana estringana force-pushed the estringana/collect-framework-endpoints-2 branch from 849a92d to b1c51ed Compare January 28, 2026 15:13
@estringana estringana force-pushed the estringana/collect-framework-endpoints-2 branch 2 times, most recently from 1571560 to 0c21a75 Compare January 28, 2026 17:03
@estringana estringana force-pushed the estringana/collect-framework-endpoints-2 branch from 0c21a75 to 9164b2a Compare January 28, 2026 17:09
// 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) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@estringana estringana merged commit 84e83a2 into master Feb 10, 2026
1525 of 1527 checks passed
@estringana estringana deleted the estringana/collect-framework-endpoints-2 branch February 10, 2026 13:38
@github-actions github-actions bot added this to the 1.17.0 milestone Feb 10, 2026
dubloom pushed a commit that referenced this pull request Feb 12, 2026
dubloom added a commit that referenced this pull request Feb 12, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants