Skip to content

perf(observability): bound log flushing and retries - #185

Merged
badcuban merged 1 commit into
mainfrom
perf/t3-learnings
Aug 24, 2026
Merged

badcuban merged 1 commit into
mainfrom
perf/t3-learnings

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Provider-event and trace loggers kept periodic flush loops alive while idle, used record-count batching, and could retry failed disk writes from hot paths. Partial failures could also retain too much data or retry chunks that had already succeeded.

Flush only when work is pending, account for UTF-8 bytes, chunk writes on complete NDJSON records, and bound retained data. Failed writes now recover through owned timers with capped exponential backoff; provider buffers share one logger-wide byte budget, and oversized records are dropped before sink I/O.

Verification:

  • EventNdjsonLogger: 11/11
  • shared observability: 14/14
  • formatting and lint passed
  • repository typecheck passed on the rebased head
  • independent production re-review: APPROVE

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
threadlines Skipped Skipped Aug 24, 2026 7:24pm

Request Review

@github-actions github-actions Bot added size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Aug 24, 2026
@badcuban
badcuban merged commit e38cf59 into main Aug 24, 2026
15 checks passed
@badcuban
badcuban deleted the perf/t3-learnings branch August 24, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant