Skip to content

feat(metrics): add series-specific payload limit config#1715

Open
rayz wants to merge 3 commits into
mainfrom
rayz/v2-series-payload-config
Open

feat(metrics): add series-specific payload limit config#1715
rayz wants to merge 3 commits into
mainfrom
rayz/v2-series-payload-config

Conversation

@rayz
Copy link
Copy Markdown
Contributor

@rayz rayz commented May 21, 2026

Summary

Adds ADP support for the Agent’s V2 series payload limit configuration keys:

  • serializer_max_series_payload_size
  • serializer_max_series_uncompressed_payload_size

These are now wired into the V2 series request builder, moved from unsupported to supported config
registry entries, and reflected in the DogStatsD config docs.

serializer_max_series_points_per_payload will not be supported as it will be removed from the Agent config.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

Existing Unit Tests + CI

References

@dd-octo-sts dd-octo-sts Bot added area/components Sources, transforms, and destinations. area/docs Reference documentation. encoder/datadog-metrics Datadog Metrics encoder. labels May 21, 2026
@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented May 21, 2026

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/saluki | run-benchmarks-adp   View in Datadog   GitLab

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: bec8c79 | Docs | Datadog PR Page | Give us feedback!

@rayz rayz changed the title feat(metrics): add V2 series-specific payload limit config feat(metrics): add series-specific payload limit config May 21, 2026
@rayz rayz marked this pull request as ready for review May 21, 2026 14:21
@rayz rayz requested a review from a team as a code owner May 21, 2026 14:21
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 21, 2026

Regression Detector (Agent Data Plane)

Run ID: 90c13792-0e7c-42d8-b0f7-f20d38da4d12
Baseline: 8c475ed7 · Comparison: bec8c799 · diff

Optimization Goals: ❌ 1 regression detected

experiment goal Δ mean % links
dsd_uds_100mb_3k_contexts_cpu (erratic) cpu 🔴 +12.24 metrics profiles logs
Fine details of change detection per experiment (34)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
otlp_ingest_logs_5mb_memory (ignored) memory ⚪ +6.15 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_cpu (erratic) cpu ⚪ +0.78 metrics profiles logs
dsd_uds_500mb_3k_contexts_memory memory ⚪ +0.65 metrics profiles logs
dsd_uds_512kb_3k_contexts_memory memory ⚪ +0.39 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_cpu (erratic) cpu ⚪ +0.34 metrics profiles logs
quality_gates_rss_idle memory ⚪ +0.22 metrics profiles logs
dsd_uds_100mb_3k_contexts_memory memory ⚪ +0.16 metrics profiles logs
dsd_uds_1mb_3k_contexts_memory memory ⚪ +0.11 metrics profiles logs
dsd_uds_10mb_3k_contexts_memory memory ⚪ +0.11 metrics profiles logs
dsd_uds_500mb_3k_contexts_cpu (erratic) cpu ⚪ +0.10 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_throughput throughput ⚪ -0.02 metrics profiles logs
dsd_uds_100mb_3k_contexts_throughput throughput ⚪ -0.01 metrics profiles logs
otlp_ingest_traces_5mb_memory memory ⚪ +0.01 metrics profiles logs
otlp_ingest_logs_5mb_throughput (ignored) throughput ⚪ -0.00 metrics profiles logs
dsd_uds_10mb_3k_contexts_throughput throughput ⚪ -0.00 metrics profiles logs
dsd_uds_1mb_3k_contexts_throughput throughput ⚪ +0.00 metrics profiles logs
dsd_uds_512kb_3k_contexts_throughput throughput ⚪ +0.00 metrics profiles logs
otlp_ingest_traces_5mb_throughput throughput ⚪ +0.01 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_memory memory ⚪ -0.02 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ -0.03 metrics profiles logs
otlp_ingest_metrics_5mb_throughput throughput ⚪ +0.03 metrics profiles logs
otlp_ingest_traces_ottl_transform_5mb_throughput throughput ⚪ +0.07 metrics profiles logs
otlp_ingest_traces_ottl_filtering_5mb_memory memory ⚪ -0.07 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ -0.10 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ -0.15 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ -0.15 metrics profiles logs
otlp_ingest_logs_5mb_cpu (ignored) cpu ⚪ -0.16 metrics profiles logs
dsd_uds_500mb_3k_contexts_throughput throughput ⚪ +0.33 metrics profiles logs
otlp_ingest_metrics_5mb_cpu (erratic) cpu ⚪ -0.75 metrics profiles logs
dsd_uds_512kb_3k_contexts_cpu (erratic) cpu ⚪ -0.93 metrics profiles logs
otlp_ingest_traces_5mb_cpu (erratic) cpu ⚪ -1.30 metrics profiles logs
otlp_ingest_metrics_5mb_memory memory ⚪ -1.51 metrics profiles logs
dsd_uds_10mb_3k_contexts_cpu (erratic) cpu 🟢 -6.84 metrics profiles logs
dsd_uds_1mb_3k_contexts_cpu (erratic) cpu 🟢 -8.30 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 118 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 39.5 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 60 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 178 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 26.7 MiB ≤ 40 MiB metrics profiles logs
Explanation

A 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 (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression.

@rayz rayz closed this May 21, 2026
@rayz rayz reopened this May 21, 2026
Comment on lines +266 to +268
if series_endpoint == MetricsEndpoint::SeriesV2 {
series_rb.with_len_limits(self.max_series_uncompressed_payload_size, self.max_series_payload_size)?;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is the main thing that strikes me as insufficient: we should be using the API-enforced limits as an upper bound (min(user_payload_size_limit, api_payload_size_limit))`.

We should never let users send payloads that risk being rejected due to exceeding size limits.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, to that end, I would change the doc comments for the config fields to say that every endpoint has an upper bound that is enforced by the API, and whatever value is specified here (as in: the user-supplied config value) will be clamped to that limit.

.. and then I'd probably also uniformly apply it to the V1 series payloads as well unless those are actually hard-coded in the Agent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/components Sources, transforms, and destinations. area/docs Reference documentation. encoder/datadog-metrics Datadog Metrics encoder.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants