Skip to content

Split the tracer parts off from ext directory#3912

Open
bwoebi wants to merge 1 commit into
masterfrom
bob/common-ext
Open

Split the tracer parts off from ext directory#3912
bwoebi wants to merge 1 commit into
masterfrom
bob/common-ext

Conversation

@bwoebi
Copy link
Copy Markdown
Collaborator

@bwoebi bwoebi commented May 23, 2026

Move all the things.
Drop a few obsolete things.
Change nearly no code.

  • git data gets collected in ext/, but git object is collected in tracer/
  • the sidecar is now always spawned, unconditionally

@bwoebi bwoebi requested review from a team as code owners May 23, 2026 00:10
@bwoebi bwoebi requested review from LobeTia and removed request for a team May 23, 2026 00:10
@datadog-prod-us1-5
Copy link
Copy Markdown

datadog-prod-us1-5 Bot commented May 23, 2026

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 126 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | appsec integration tests (ssi): [test8.3-release-ssi]   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). 1 test failed: AssertionError - Found helper when not expected during sidecar checks.

🧪 1 Test failed

appsec is disabled and sidecar is not launched() from com.datadog.appsec.php.integration.SidecarFeaturesDisabledTests   View in Datadog (Fix with Cursor)
java.lang.AssertionError: Found helper when not expected: USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   1008    28 ?        Ss   21:56   0:00 /sbin/docker-init -- /entrypoint.sh
root         7  0.0  0.0   2432  1408 ?        S    21:56   0:00 tail -n +1 -F /tmp/logs/appsec.log /tmp/logs/helper.log /tmp/logs/php_error.log /tmp/logs/sidecar.log /tmp/logs/apache2/access.log /tmp/logs/apache2/error.log
root       189  2.0  0.0 104164 35288 ?        Ss   21:56   0:00 /usr/sbin/apache2 -k start
www-data   192  0.0  0.0 256956 27792 ?        Sl   21:56   0:00 /usr/sbin/apache2 -k start
www-data   193  0.0  0.0 104440 14224 ?        S    21:56   0:00 /usr/sbin/apache2 -k start
www-data   194  0.0  0.0 104440 14224 ?        S    21:56   0:00 /usr/sbin/apache2 -k start
www-data   195  0.0  0.0 104440 14224 ?        S    21:56   0:00 /usr/sbin/apache2 -k start
www-data   196  0.0  0.0 104440 14224 ?        S    21:56   0:00 /usr/sbin/apache2 -k start
www-data   202  0.0  0.0 1239928 18104 ?       Ssl  21:56   0:00 datadog-ipc-helper /tmp/.tmp9bOqgp /tmp/dd-package/loader/libddtrace_php.so ddog_daemon_entry_point
...

DataDog/apm-reliability/dd-trace-php | ASAN test_c: [8.0, arm64]   View in Datadog   GitLab

🔄 Retry job. This looks flaky and may succeed on retry. Unable to load dynamic library 'ddtrace.so': cannot allocate memory in static TLS block.

🧪 10 Tests failed

tmp/build_extension/tests/ext/traced_attribute_delayed.phpt (Test delayed resolution of tracing attributes) from PHP.tmp.build_extension.tests.ext   View in Datadog (Fix with Cursor)
002+ 
003+ Fatal error: Uncaught Error: Call to undefined function DDTrace\install_hook() in tmp/build_extension/tests/ext/traced_attribute_delayed.php:14
004+ Stack trace:
005+ #0 {main}
006+   thrown in tmp/build_extension/tests/ext/traced_attribute_delayed.php on line 14
001- int(1)
002- int(1)
003- spans(\DDTrace\SpanData) (2) {
004-   simpleclass (traced_attribute_delayed.php, simpleclass, cli)
005-     _dd.p.dm => -0
...
tmp/build_extension/tests/ext/traced_attribute.phpt (Test tracing via attributes) from PHP.tmp.build_extension.tests.ext   View in Datadog (Fix with Cursor)
002+ 
003+ Fatal error: Uncaught Error: Call to undefined function dd_trace_serialize_closed_spans() in tmp/build_extension/tests/ext/sandbox/dd_dumper.inc:5
004+ Stack trace:
005+ #0 tmp/build_extension/tests/ext/traced_attribute.php(48): dd_dump_spans()
006+ #1 {main}
007+   thrown in tmp/build_extension/tests/ext/sandbox/dd_dumper.inc on line 5
001- spans(\DDTrace\SpanData) (3) {
002-   bar (traced_attribute.php, bar, cli)
003-     _dd.code_origin.frames.0.file => %s
004-     _dd.code_origin.frames.0.line => 22
...
View all 10 test failures

DataDog/apm-reliability/dd-trace-php | test_web_custom: [8.3, fpm-fcgi]   View in Datadog   GitLab

🛟 This job is unlikely to succeed on retry. Please review your pipeline configuration. 1 error: No JSON found in startup log at /go/src/github.com/DataDog/apm-reliability/dd-trace-php/tests/Integrations/Custom/Autoloaded/StartupLoggingTest.php:105. 2 failures: Expected at least 3 traces from multiple requests, but received 0 at /go/src/github.com/DataDog/apm-reliability/dd-trace-php/tests/Integrations/Custom/Autoloaded/SidecarThreadModeTest.php:69.

🧪 2 Tests failed

testThreadModeMultipleRequests from custom-framework-autoloading-test.DDTrace\Tests\Integrations\Custom\Autoloaded\SidecarThreadModeTest   View in Datadog (Fix with Cursor)
DDTrace\Tests\Integrations\Custom\Autoloaded\SidecarThreadModeTest::testThreadModeMultipleRequests
Expected at least 3 traces from multiple requests
Failed asserting that 0 is equal to 3 or is greater than 3.

tests/Integrations/Custom/Autoloaded/SidecarThreadModeTest.php:69
tests/Common/RetryTraitVersionGeneric.php:28
testThreadModeTracesAreSubmitted from custom-framework-autoloading-test.DDTrace\Tests\Integrations\Custom\Autoloaded\SidecarThreadModeTest   View in Datadog (Fix with Cursor)
DDTrace\Tests\Integrations\Custom\Autoloaded\SidecarThreadModeTest::testThreadModeTracesAreSubmitted
Expected traces to be submitted through thread-based sidecar
Failed asserting that an array is not empty.

tests/Integrations/Custom/Autoloaded/SidecarThreadModeTest.php:45
tests/Common/RetryTraitVersionGeneric.php:28

View all 126 failed jobs.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 27d286e | Docs | Datadog PR Page | Give us feedback!

Copy link
Copy Markdown

@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

#include "compatibility.h"

P1 Badge Fix weakrefs include path after move to tracer/

After moving weakrefs.c to tracer/, it still includes "compatibility.h" as if it were in ext/. In this commit config.m4 also drops PHP_ADD_INCLUDE([$ext_srcdir/ext]), so for PHP 8.0/8.1 builds (where weakrefs.c is compiled) the header is no longer resolvable and the build fails. Use #include <ext/compatibility.h> (or restore/include the ext include path) to keep those builds working.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread config.m4 Outdated
@bwoebi bwoebi force-pushed the bob/common-ext branch 6 times, most recently from 1bc2038 to 4a29a16 Compare May 23, 2026 13:28
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 23, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-05-25 22:00:13

Comparing candidate commit 27d286e in PR branch bob/common-ext with baseline commit 0fb4c56 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 29 metrics, 7 unstable metrics.

@bwoebi bwoebi force-pushed the bob/common-ext branch 5 times, most recently from bdedead to 0dbe6ac Compare May 25, 2026 13:20
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 25, 2026

Benchmarks [ appsec ]

Benchmark execution time: 2026-05-25 22:22:25

Comparing candidate commit 27d286e in PR branch bob/common-ext with baseline commit 0fb4c56 in branch master.

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

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 25, 2026

Benchmarks [ tracer ]

Benchmark execution time: 2026-05-25 22:59:41

Comparing candidate commit 27d286e in PR branch bob/common-ext with baseline commit 0fb4c56 in branch master.

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

scenario:EmptyFileBench/benchEmptyFileBaseline-opcache

  • 🟥 execution_time [+105.233µs; +340.227µs] or [+2.591%; +8.376%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟥 execution_time [+18.723µs; +20.517µs] or [+18.183%; +19.926%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟥 execution_time [+8.339µs; +10.401µs] or [+7.961%; +9.930%]

scenario:SamplingRuleMatchingBench/benchRegexMatching1

  • 🟥 execution_time [+48.852ns; +96.548ns] or [+3.342%; +6.605%]

@bwoebi bwoebi force-pushed the bob/common-ext branch 2 times, most recently from 30dd29b to 38feb1b Compare May 25, 2026 21:09
Signed-off-by: Bob Weinand <bob.weinand@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.

1 participant