Skip to content

Batch metrics submission to avoid HTTP 413 on large builds#385

Open
yoannmoinet wants to merge 1 commit into
masterfrom
yoann/batch-metrics-submission
Open

Batch metrics submission to avoid HTTP 413 on large builds#385
yoannmoinet wants to merge 1 commit into
masterfrom
yoann/batch-metrics-submission

Conversation

@yoannmoinet
Copy link
Copy Markdown
Member

@yoannmoinet yoannmoinet commented May 20, 2026

What and why?

Large builds can generate enough metrics to exceed the Datadog API's payload size limit, resulting in HTTP 413 Payload Too Large errors.

How?

Split the metrics array into batches of 500 before sending, and fire them all in parallel with Promise.all. Single-batch builds are unaffected; larger ones get chunked automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yoannmoinet yoannmoinet marked this pull request as ready for review May 20, 2026 20:50
@yoannmoinet yoannmoinet requested a review from a team as a code owner May 20, 2026 20:50
@yoannmoinet yoannmoinet requested review from nchapma2 and removed request for a team May 20, 2026 20:50
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.

2 participants