fix(metrics): Make v2 series obey max per-payload series points (1.3.x backport) - #2081
Conversation
## Summary <!-- Please provide a brief summary about what this PR does. This should help the reviewers give feedback faster and with higher quality. --> Repair a differential between DogStatsd and ADP. This commit causes the series builder to obey both the `max_metrics_per_payload` _and_ `max_series_points_per_payload` for `/api/v2/series`. This is already correctly handled for v3. ADP will now split payloads that are over-sized in a like manner to DogStatsd. ## Change Type - [x] Bug fix - [ ] New feature - [ ] Non-functional (chore, refactoring, docs) - [ ] Performance ## How did you test this PR? <!-- Please how you tested these changes here --> Included test, then Antithesis shot. ## References <!-- Please list any issues closed by this PR. --> <!-- - Closes: <issue link> --> REF SMPTNG-765 <!-- Any other issues or PRs relevant to this PR? Feel free to list them here. -->
There was a problem hiding this comment.
Pull request overview
Backport of the v2 series payload-splitting fix to releases/1.3.x, ensuring /api/v2/series request construction enforces both max_metrics_per_payload and max_series_points_per_payload, aligning ADP behavior with DogStatsD (v3 already enforced point limits correctly).
Changes:
- Apply
max_series_points_per_payloadto the v2 request builder when targeting series endpoints (V1/V2). - Extend
EndpointConfigurationto carrymax_series_points_per_payloadand thread it through configuration construction. - Add a regression unit test verifying v2 series payloads never exceed the configured per-payload point limit and that all points are emitted.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/saluki-components/src/encoders/datadog/metrics/v2/mod.rs | Enforces per-payload data-point limits for series endpoints in the v2 request builder. |
| lib/saluki-components/src/encoders/datadog/metrics/mod.rs | Threads the new endpoint configuration parameter and adds a regression test for v2 point-limit splitting. |
| lib/saluki-components/src/encoders/datadog/metrics/endpoint.rs | Extends EndpointConfiguration with max_series_points_per_payload and exposes an accessor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Binary Size Analysis (Agent Data Plane)Baseline: f546aa0 · Comparison: cca78dc · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (5)Experiments configured
Bounds Checks: ✅ Passed (5)
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 ( |
a2776c2
into
releases/1.3.x
…x backport) (#2081) ## Summary Backports #2055 to `releases/1.3.x`. Repairs a differential between DogStatsD and ADP: the v2 series request builder now obeys both `max_metrics_per_payload` **and** `max_series_points_per_payload` for `/api/v2/series`, splitting oversized payloads the same way DogStatsD does. v3 already handled this correctly. The regression was introduced by the metrics-encoder refactor (splitting into `endpoint.rs` / `v2` / `v3` modules), which 1.3.x carries. Clean cherry-pick of `0025407262` (#2055) — 1.3.x shares main's encoder structure. ## Validation - `cargo check -p saluki-components` passes. - Unit tests pass, including the new regression test `v2_series_builder_enforces_max_series_points_per_payload`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: blt <brian.troutwine@datadoghq.com> Co-authored-by: jesse.szwedko <jesse.szwedko@datadoghq.com>
Summary
Backports #2055 to
releases/1.3.x.Repairs a differential between DogStatsD and ADP: the v2 series request builder now obeys both
max_metrics_per_payloadandmax_series_points_per_payloadfor/api/v2/series, splitting oversized payloads the same way DogStatsD does. v3 already handled this correctly. The regression was introduced by the metrics-encoder refactor (splitting intoendpoint.rs/v2/v3modules), which 1.3.x carries.Clean cherry-pick of
0025407262(#2055) — 1.3.x shares main's encoder structure.Validation
cargo check -p saluki-componentspasses.v2_series_builder_enforces_max_series_points_per_payload.🤖 Generated with Claude Code