checker: batch Tinybird events per data source (#2974) master
* checker: batch Tinybird events per data source Rows are grouped per data source and sent as one NDJSON request to the Events API after 2s (plus up to 1s of jitter) or 5 MB. SendEvent still returns once its row is recorded, so a Pub/Sub ack keeps meaning the result is in Tinybird. Tinybird allows 100 appends/s per workspace, whatever the row count. Under Pub/Sub every checker wakes at cronTimestamp, so one POST per check sent thousands of appends in the first seconds of each minute. The 429s nacked the message and re-ran the probe, which fed the storm. A batch is retried on 429 (honoring Retry-After), 5xx and network errors for up to 30s before its rows get the error. One request per data source is in flight at a time. Each flush logs a sampled 'tinybird flush' wide event, and pending batches are flushed on shutdown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * checker: bound queued Tinybird flushes and the shutdown flush Address review on #2974: the retry budget now starts when a batch is detached, Close aborts in-flight retries, the final flush gets an absolute shutdown deadline, response bodies are drained, request-building errors are not retried, and TINYBIRD_RETRY_BUDGET<=0 keeps the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>