[php] Re-enable Test_ExtendedHeartbeat for PHP with SchemaBug for null dependency versions#6919
Conversation
…ions Yesterday's revert (4aabacf) 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) <noreply@anthropic.com>
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2efda83c0
ℹ️ 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".
| SchemaBug( | ||
| endpoint="/telemetry/proxy/api/v2/apmtelemetry", | ||
| data_path="$.payload.dependencies[].version", | ||
| condition=context.library == "php", |
There was a problem hiding this comment.
Narrow the PHP schema exemption to the extended-heartbeat scenario
Because Test_DdtraceSchemas is decorated with @scenario_groups.end_to_end, this condition applies in every PHP end-to-end scenario, not just TELEMETRY_EXTENDED_HEARTBEAT. Any PHP telemetry request on this endpoint with a null payload.dependencies[].version (for example an app-dependencies-loaded payload in DEFAULT) will now be silently excluded from schema validation, even though the manifest change only re-enables Test_ExtendedHeartbeat for >=1.20.0. Please scope this exemption at least to context.scenario is scenarios.telemetry_extended_heartbeat (and mirror that on the agent entry below) so unrelated PHP schema regressions remain visible.
Useful? React with 👍 / 👎.
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) <noreply@anthropic.com>
…tbeat 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) <noreply@anthropic.com>
Co-authored-by: Charles de Beauchesne <charles.debeauchesne@datadoghq.com>
🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 192834a | Docs | Datadog PR Page | Give us feedback! |
Summary
Re-enables
Test_ExtendedHeartbeatfor PHP at>=1.20.0by registering aSchemaBugfor the known null-version-in-dependencies deviation, instead of disabling the test entirely.Follow-up to #6338 (merged 2026-05-12) where I had to revert PHP back to
missing_featurein commit4aabacfb7becausedd-trace-phpemitsnullfordependencies[].versionin theapp-extended-heartbeatpayload, failing schema validation inTest_DdtraceSchemaswith:Tracking ticket
APMAPI-1938 — PHP emits null for dependencies[].version in app-extended-heartbeat payload — filed against APM SDK Capabilities, Bug,
system-testslabel, unassigned for apm-php triage.Why a SchemaBug rather than leave the test disabled?
dd-trace-phpmaster via the submodule pin at91fd13c8(12 commits ahead of libdatadog#1910, also includes #1962 "include dependencies and integrations in app-extended-heartbeat"). The dependencies array is being populated correctly.dd-trace-php's own dependency tracker emittingnullfor theversionfield on some entries — a tracer-side fix, not a libdatadog gap. As of 2026-05-13 there's no fix ondd-trace-phpmaster for this.SchemaBugfor$.payload.configuration[].value(ticket APMS-12697), which we dropped in Add end-to-end Test_ExtendedHeartbeat for app-extended-heartbeat telemetry event #6338 once the spec was relaxed in instrumentation-telemetry-api-docs#124. Same shape: document the deviation, keep the test running for everything else.Changes
manifests/php.yml— flipTest_ExtendedHeartbeatfrommissing_featureback to'>=1.20.0'.tests/schemas/test_schemas.py— addSchemaBugentries scoped tophpANDscenarios.telemetry_extended_heartbeatfor$.payload.dependencies[].versionon both the library (/telemetry/proxy/api/v2/apmtelemetry) and agent (/api/v2/apmtelemetry) interfaces. Scenario scoping ensures unrelated null-version regressions in other PHP payloads (e.g.app-dependencies-loadedin DEFAULT) remain visible.