Skip to content

[debugger] Require the root timestamp on debugger snapshot payloads - #8197

Draft
dudikeleti wants to merge 2 commits into
mainfrom
dudik/debugger-schema-root-timestamp
Draft

dudikeleti wants to merge 2 commits into
mainfrom
dudik/debugger-schema-root-timestamp

Conversation

@dudikeleti

@dudikeleti dudikeleti commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

The "Log probes configuration" RFC defines the snapshot payload sent to the intake with timestamp at the root as well as in debugger.snapshot, both in epoch milliseconds with the same value. Snapshots go through the logs intake as log entries, and the logs pipeline takes the event date from the root attribute.

tests/schemas/utils/agent/api/v2/debugger-request.json listed the root timestamp as an optional property, so tracers that only set debugger.snapshot.timestamp weren't caught. Two did: .NET, fixed by DataDog/dd-trace-dotnet#9532, and Node.js, fixed by DataDog/dd-trace-js#10939.

This also showed up in #7876: the start_time filter in tests/debugger/utils.py uses the root timestamp, so on .NET it never applies.

Changes

  • debugger-request.json: items whose debugger object has a snapshot must have a root timestamp (if/then next to the existing oneOf). Diagnostics items are unchanged.
  • test_schemas.py: a known-bug entry (DEBUG-6442) for /api/v2/debugger at $[] covers released versions without the fix: .NET below 3.57.0, and Node.js below 5.133.0 or 6.x below 6.22.0. The existing Node.js entry (DEBUG-3487) only covers errors at $.

Checked offline with jsonschema==4.16.0 against the /api/v2/debugger payloads captured in run 40476310561 and run 40476449992, DEBUGGER_INPRODUCT_ENABLEMENT:

Library Payload files Errors with main's schema Errors with this schema
Java (spring-boot-jetty) 15 0 0
Python (flask-poc) 21 0 0
PHP (apache-mod-8.2) 12 0 0
.NET (poc) 4 0 4, 'timestamp' is a required property at $[]

Go had no /api/v2/debugger payloads in that scenario; this PR's CI covers it and the other scenarios.

dev jobs report the next version (dotnet@3.57.0), so the known-bug entry doesn't cover them: the .NET dev job fails Test_DdtraceSchemas::test_agent until DataDog/dd-trace-dotnet#9532 is merged and in the dev build. Node.js dev already has DataDog/dd-trace-js#10939.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Tests, manifest, weblog are modified -> you'll need a review from system-tests-reviewers: ask to one of youre co-worker familiar with the tested feature.
    • Framework is modified, or non obvious usage of it -> get a review from system-tests-core (slack)

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

🤖 Generated with Claude Code

The log probes RFC defines the snapshot payload sent to the intake with
timestamp at the root as well as in debugger.snapshot. Snapshots go
through the logs intake, which dates an event from the root attribute.
The agent schema listed the root timestamp but didn't require it, so
tracers that only set debugger.snapshot.timestamp went unnoticed.

Require it on items whose debugger object has a snapshot. Diagnostics
items are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/schemas/test_schemas.py                                           @DataDog/system-tests-reviewers
tests/schemas/utils/agent/api/v2/debugger-request.json                  @DataDog/system-tests-reviewers

@datadog-official

datadog-official Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

✨ Unblock PR with BitsAI

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 18 Pipeline jobs failed

Testing the test | System Tests (dotnet, dev) / End-to-end #1 / poc 1 — ❌ 1 test failed · 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

❌ tests.schemas.test_schemas.Test_DdtraceSchemas.test_agent[poc] from system_tests_suite
oint=&#34;/api/v2/debugger&#34;,
                data_path=&#34;$&#34;,
                condition=context.library &gt; &#34;nodejs@5.36.0&#34;,
            ),
            SchemaBug(
                endpoint=&#34;/api/v2/apmtelemetry&#34;,
                data_path=&#34;$.payload.configuration[]&#34;,
                condition=context.library &gt;= &#34;nodejs@2.27.1&#34;
                or context.scenario in (scenarios.crossed_tracing_libraries, scenarios.graphql_appsec),
                ticket=&#34;APPSEC-52805&#34;,
...
Testing the test | System Tests (dotnet, dev) / End-to-end #1 / uds 1 — ❌ 1 test failed · 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

❌ tests.schemas.test_schemas.Test_DdtraceSchemas.test_agent[uds] from system_tests_suite
oint=&#34;/api/v2/debugger&#34;,
                data_path=&#34;$&#34;,
                condition=context.library &gt; &#34;nodejs@5.36.0&#34;,
            ),
            SchemaBug(
                endpoint=&#34;/api/v2/apmtelemetry&#34;,
                data_path=&#34;$.payload.configuration[]&#34;,
                condition=context.library &gt;= &#34;nodejs@2.27.1&#34;
                or context.scenario in (scenarios.crossed_tracing_libraries, scenarios.graphql_appsec),
                ticket=&#34;APPSEC-52805&#34;,
...
Testing the test | System Tests (php, dev) / End-to-end #1 / apache-mod-7.0-zts 1 — ❌ 1 test failed · 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

❌ tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots_With_SCM.test_log_method_snapshot[apache-mod-7.0-zts] from system_tests_suite
AssertionError: assert &#39;Probes did not reach INSTALLED status&#39; is None
 &#43;  where &#39;Probes did not reach INSTALLED status&#39; = &lt;built-in method join of str object at 0x7f82e5e2b720&gt;([&#39;Probes did not reach INSTALLED status&#39;])
 &#43;    where &lt;built-in method join of str object at 0x7f82e5e2b720&gt; = &#39;\n&#39;.join
 &#43;    and   [&#39;Probes did not reach INSTALLED status&#39;] = &lt;tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots_With_SCM object at 0x7f82cfa68bf0&gt;.setup_failures

self = &lt;tests.debugger.test_debugger_probe_snapshot.Test_Debugger_Method_Probe_Snaphots_With_SCM object at 0x7f82cfa68bf0&gt;

    def test_log_method_snapshot(self):
&gt;       self._assert()

...

View all 18 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: 03d6335 | Docs | View more details | Give us feedback!

… Node.js

Released .NET versions before 3.57.0 and Node.js versions before 5.133.0
and 6.22.0 only set debugger.snapshot.timestamp (DEBUG-6442). The fixes
are DataDog/dd-trace-dotnet#9532 and DataDog/dd-trace-js#10939.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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