Skip to content

perf(evals): Upload Sentry Evals results in concurrent batches - #5336

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
perf/eval-report-batching
Open

sentry-junior[bot] wants to merge 1 commit into
mainfrom
perf/eval-report-batching

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

The "Report evals to Sentry Evals" step is slow because report.mjs posts one scenario per POST /api/runs/{id}/cases request, one after another, so the step's time grows with the number of scenarios. The endpoint already takes an array of scenarios, so the uploader now sends them in batches:

  • Up to 25 scenarios and at most 1 MB of scenario JSON per request, well under Vercel's 4.5 MB request body limit. A scenario larger than the byte cap goes in a batch of its own, as it did before.
  • Four requests in flight at a time.

Failure behavior stays as strict as before:

  • Sentry Evals stores each request's scenarios in one transaction, so a failed batch stores none of its scenarios.
  • A non-2xx response, a timeout, or a response whose reported or total count does not match the batch size fails the step. The server ignores names it does not know, so the count check catches a dropped scenario.
  • After a failure, no new batch starts. The step waits for batches already in flight, then fails with the first error. Nothing is retried.

via @thomasjiangcy.

--

View Session [Sentry]

report.mjs posted one scenario per request. Send up to 25 scenarios,
and at most 1 MB, per request, with four requests in flight. A failed
or partly accepted batch still fails the step, and no new batch starts
after a failure.

Co-Authored-By: Thomas Jiang <20501235+thomasjiangcy@users.noreply.github.com>
@vercel

vercel Bot commented Dec 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Dec 6, 2026 1:37pm UTC

Request Review

@sentry-junior
sentry-junior Bot marked this pull request as ready for review December 6, 2026 14:15
@sentry-junior
sentry-junior Bot requested a review from thomasjiangcy December 6, 2026 14:15
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 6, 2026

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 6deb8a37 Deployed Dec 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant