chore(antithesis): Intro Intake V3 - #2214
Conversation
This commit introduces a v3 intake into antithesis harness to support symmetric difference with ADP-on -- v2 by default -- and ADP-off -- v3 by default.
|
Binary Size Analysis (Agent Data Plane)Baseline: e34c659 · Comparison: 66abc6e · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
There was a problem hiding this comment.
More details
The intake-oracle changes are internally consistent across the v2 source-gated decoder, v3 columnar cursor handling, sketch path, and request measurement stack. Focused execution could not complete because the sandbox could neither install the pinned Rust 1.94 toolchain nor fetch the required Git dependency, leaving runtime validation as the remaining gap.
🤖 Datadog Autotest · Commit 66abc6e · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66abc6ebcf
ℹ️ 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".
| Router::new().route("/api/v2/series", post(metrics::handle_series).layer(layers)) | ||
| Router::new() | ||
| .route("/api/v2/series", post(metrics::handle_series)) | ||
| .route("/api/intake/metrics/v3/series", post(metrics::handle_series_v3)) |
There was a problem hiding this comment.
Enable v3 emission before adding the v3 intake route
In the checked differential scenario, first_sample_config still unconditionally appends use_v2_api_series: true in test/antithesis/harness/src/config.rs:178-184, so the reference Agent continues posting series to /api/v2/series and never invokes this new handler. Consequently the v3 decoder and Pyld26–Pyld59 assertions are not exercised by Antithesis and can remain false-green; disable the v2 pin (and align the configured endpoint path) as part of enabling this route.
Useful? React with 👍 / 👎.
| let reserved = tags | ||
| .iter() | ||
| .find(|tag| tag.starts_with("device:") || tag.starts_with("dd.internal.resource:")); |
There was a problem hiding this comment.
Exempt v3 sketches from the reserved-tag assertion
When a v3 sketch carries device: or dd.internal.resource: tags, this unconditional assertion reports Pyld14 as failed even though the repository's v3 encoder intentionally preserves those tags for sketches (lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1577-1579), with an explicit test at lines 2615-2631. Restrict this scalar-series resource-promotion rule to non-sketch kinds, as the separate /api/beta/sketches checks already do, or valid v3 sketch output will falsely redden an experiment.
Useful? React with 👍 / 👎.
| fn kept_series_tags(name: &str, tags: &[String], resources: &[(String, String)]) -> Option<Vec<String>> { | ||
| if tags.len() > MAX_TAG_COUNT || resources.len() > MAX_RESOURCE_COUNT || !metric_name_kept(name) { | ||
| return None; |
There was a problem hiding this comment.
Drop v3 series when origin processing fails
When the backend's source-dependent processOrigin validation rejects a series—the case acknowledged immediately above—kept_series_tags still returns Some because it receives neither the origin nor source. The fact that origin is not part of Context does not make this harmless: production drops the entire series, so its context must be absent, whereas this decoder records a phantom context and can create a false differential mismatch. Thread the source/origin result into the per-series keep decision.
Useful? React with 👍 / 👎.
| // EVERY source, agent included: the name stays `string` in the bytes-tag variant too. The | ||
| // leading 0xFF guarantees invalid UTF-8 regardless of the generated suffix. | ||
| #[test] | ||
| fn prop_non_utf8_name_rejected_for_all_sources(suffix in prop::collection::vec(any::<u8>(), 0..8)) { |
There was a problem hiding this comment.
Prefix the new proptest with property_test_
This newly added proptest lacks the literal property_test_ prefix, so the Makefile's name filters run it in the debug-mode test job instead of the dedicated release-mode test-property job. Rename it with the required prefix so the new decoder property receives the intended release-mode coverage.
AGENTS.md reference: AGENTS.md:L39-L41
Useful? React with 👍 / 👎.
| .collect::<Vec<_>>() | ||
| }; | ||
|
|
||
| let mut resources: Vec<Vec<(String, String)>> = vec![Vec::new()]; |
There was a problem hiding this comment.
Apply metadata resources to resource set zero
When a v3 payload carries common resources in Payload.metadata.resources and a series uses resourcesRefs = 0, this initialization leaves resource set zero empty; meta_pairs are appended only to explicit dictionary groups in the loop below. Since zero represents the empty per-series set, it is precisely the case where global metadata resources such as host must still apply. The decoder therefore loses the host tag, falsely fails Pyld17, and records a context that differs from production for payloads using metadata-only resources; initialize the zero set with meta_pairs as well.
Useful? React with 👍 / 👎.
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (3)Experiments configured
Bounds Checks: ✅ Passed (3)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |

Summary
This commit introduces a v3 intake into antithesis harness to support
symmetric difference with ADP-on -- v2 by default -- and ADP-off -- v3
by default.
Change Type
How did you test this PR?
References