From 23bdc42805d7113b506e8f53748e5093421bf8de Mon Sep 17 00:00:00 2001 From: Ayan Khan Date: Wed, 13 May 2026 10:07:33 -0400 Subject: [PATCH 1/4] Re-enable Test_ExtendedHeartbeat for php with SchemaBug for null versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Yesterday's revert (4aabacfb7) flipped php Test_ExtendedHeartbeat back to missing_feature because dd-trace-php v1.20.0 emits null for dependencies[].version in the app-extended-heartbeat payload, failing schema validation in Test_DdtraceSchemas. The libdatadog-side fixes (#1910 schedule ExtendedHeartbeat, #1962 include dependencies and integrations) are already in dd-trace-php master via the submodule pin at 91fd13c8 — the remaining null-version emission is a dd-trace-php tracker bug, not a libdatadog gap. Register the deviation as a SchemaBug (parallels the pattern used for golang's $.payload.configuration[].value before the spec relaxation in instrumentation-telemetry-api-docs#124) on both the library (/telemetry/proxy/api/v2/apmtelemetry) and agent (/api/v2/apmtelemetry) interfaces, scoped to php. Re-enables Test_ExtendedHeartbeat at >=1.20.0. Ticket placeholder PHP-XXXX — needs a real apm-php ticket filed for the null-version emission so this entry can be tracked to removal. Co-Authored-By: Claude Opus 4.7 (1M context) --- manifests/php.yml | 2 +- tests/schemas/test_schemas.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/manifests/php.yml b/manifests/php.yml index 06928d6405b..8006251e9b9 100644 --- a/manifests/php.yml +++ b/manifests/php.yml @@ -1119,7 +1119,7 @@ manifest: component_version: '>=0.93.0' tests/test_standard_tags.py::Test_StandardTagsUserAgent: v0.75.0 tests/test_telemetry.py::Test_DependencyEnable: missing_feature - tests/test_telemetry.py::Test_ExtendedHeartbeat: missing_feature (PHP v1.20.0 emits null for dependencies[].version in app-extended-heartbeat, failing schema validation) + tests/test_telemetry.py::Test_ExtendedHeartbeat: '>=1.20.0' tests/test_telemetry.py::Test_Log_Generation: # TODO: a lower version might be supported - weblog_declaration: '*': missing_feature diff --git a/tests/schemas/test_schemas.py b/tests/schemas/test_schemas.py index 379f3b87303..266c2c142ff 100644 --- a/tests/schemas/test_schemas.py +++ b/tests/schemas/test_schemas.py @@ -80,6 +80,12 @@ def test_library(self): condition=context.library > "php@1.7.3", ticket="APMAPI-1270", ), + SchemaBug( + endpoint="/telemetry/proxy/api/v2/apmtelemetry", + data_path="$.payload.dependencies[].version", + condition=context.library == "php", + ticket="PHP-XXXX", # TODO: file ticket — dd-trace-php emits null version for some dependencies in app-extended-heartbeat + ), SchemaBug( endpoint="/debugger/v1/diagnostics", data_path="$[]", @@ -158,6 +164,12 @@ def test_agent(self): condition=context.library > "php@1.7.3", ticket="XXX-1234", ), + SchemaBug( + endpoint="/api/v2/apmtelemetry", + data_path="$.payload.dependencies[].version", + condition=context.library == "php", + ticket="PHP-XXXX", # TODO: file ticket — dd-trace-php emits null version for some dependencies in app-extended-heartbeat + ), SchemaBug( endpoint="/api/v2/debugger", data_path="$[]", From d3fe5744436e247334732583365e7bb10002126e Mon Sep 17 00:00:00 2001 From: Ayan Khan Date: Wed, 13 May 2026 10:30:25 -0400 Subject: [PATCH 2/4] Replace PHP-XXXX placeholder with APMAPI-1938 in SchemaBug entries Filed ticket: https://datadoghq.atlassian.net/browse/APMAPI-1938 ("PHP emits null for dependencies[].version in app-extended-heartbeat payload") Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/schemas/test_schemas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/schemas/test_schemas.py b/tests/schemas/test_schemas.py index 266c2c142ff..c924b2c8007 100644 --- a/tests/schemas/test_schemas.py +++ b/tests/schemas/test_schemas.py @@ -84,7 +84,7 @@ def test_library(self): endpoint="/telemetry/proxy/api/v2/apmtelemetry", data_path="$.payload.dependencies[].version", condition=context.library == "php", - ticket="PHP-XXXX", # TODO: file ticket — dd-trace-php emits null version for some dependencies in app-extended-heartbeat + ticket="APMAPI-1938", ), SchemaBug( endpoint="/debugger/v1/diagnostics", @@ -168,7 +168,7 @@ def test_agent(self): endpoint="/api/v2/apmtelemetry", data_path="$.payload.dependencies[].version", condition=context.library == "php", - ticket="PHP-XXXX", # TODO: file ticket — dd-trace-php emits null version for some dependencies in app-extended-heartbeat + ticket="APMAPI-1938", ), SchemaBug( endpoint="/api/v2/debugger", From be9a9aae37006d499ea16c4a7f6f6e543ffa1373 Mon Sep 17 00:00:00 2001 From: Ayan Khan Date: Wed, 13 May 2026 10:35:24 -0400 Subject: [PATCH 3/4] Scope php dependencies[].version SchemaBug to telemetry_extended_heartbeat scenario Per PR review (Codex bot): Test_DdtraceSchemas runs in every @scenario_groups.end_to_end scenario, so an unscoped php exemption would silently mask null-version regressions in unrelated payloads like app-dependencies-loaded under the DEFAULT scenario. Narrow the condition to context.scenario is scenarios.telemetry_extended_heartbeat on both the library and agent interface entries so unrelated regressions stay visible. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/schemas/test_schemas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/schemas/test_schemas.py b/tests/schemas/test_schemas.py index c924b2c8007..3afaf02b593 100644 --- a/tests/schemas/test_schemas.py +++ b/tests/schemas/test_schemas.py @@ -83,7 +83,7 @@ def test_library(self): SchemaBug( endpoint="/telemetry/proxy/api/v2/apmtelemetry", data_path="$.payload.dependencies[].version", - condition=context.library == "php", + condition=context.library == "php" and context.scenario is scenarios.telemetry_extended_heartbeat, ticket="APMAPI-1938", ), SchemaBug( @@ -167,7 +167,7 @@ def test_agent(self): SchemaBug( endpoint="/api/v2/apmtelemetry", data_path="$.payload.dependencies[].version", - condition=context.library == "php", + condition=context.library == "php" and context.scenario is scenarios.telemetry_extended_heartbeat, ticket="APMAPI-1938", ), SchemaBug( From 192834afae31714678a5204599fc07c6fcbcfbd7 Mon Sep 17 00:00:00 2001 From: Ayan Khan Date: Wed, 13 May 2026 10:50:37 -0400 Subject: [PATCH 4/4] Update manifests/php.yml Co-authored-by: Charles de Beauchesne --- manifests/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/php.yml b/manifests/php.yml index 8006251e9b9..3d7bce90815 100644 --- a/manifests/php.yml +++ b/manifests/php.yml @@ -1119,7 +1119,7 @@ manifest: component_version: '>=0.93.0' tests/test_standard_tags.py::Test_StandardTagsUserAgent: v0.75.0 tests/test_telemetry.py::Test_DependencyEnable: missing_feature - tests/test_telemetry.py::Test_ExtendedHeartbeat: '>=1.20.0' + tests/test_telemetry.py::Test_ExtendedHeartbeat: v1.20.0 tests/test_telemetry.py::Test_Log_Generation: # TODO: a lower version might be supported - weblog_declaration: '*': missing_feature