Project 29 of 84
Datadog Metrics Buffer
Agentless, buffered, batching Datadog metrics client for Node/TypeScript: counters, gauges, histograms and distributions are aggregated in-process and flushed to the Datadog HTTP API on an interval, so metrics work where no Datadog Agent/DogStatsD is available (Lambda, CI, CLIs, short-lived containers).
- Status
- In progress
- Last activity
- 2026
- Live
No public deployment.
- Stack
- TypeScript
- Node
- ESM
- dd-trace
- vitest
- nock
- ESLint
- pnpm
Highlights
- Hardened an agentless TypeScript Datadog metrics client for long-running services: added a stop() lifecycle, contained synchronous reporter throws during timer-driven flushes so the flush loop keeps running, stopped orphaned shared-logger timers on re-init, and added opt-in HTTP 429/5xx retry through the official Datadog API client.
- Bounded per-histogram memory with reservoir sampling (Algorithm R, default 10,000 samples) while keeping exact min/max/sum/count/avg, and fixed a median() indexing bug that could return NaN once samples were capped.
- Added payload validation that drops NaN/Infinity values and warns once on metric names or tags that break Datadog's documented limits, without ever throwing from the metrics path.
- Moved the library from a personal account into the catesworks GitHub org with a combined transfer and rename that kept the repo id, renamed the package, and switched CI to the shared self-hosted runner group on Node 24 after checking engines bounds. All seven PRD acceptance stories passed.
- Set up release engineering with Changesets and a version-or-publish GitHub Actions workflow using npm OIDC trusted publishing (no stored NPM_TOKEN), Turborepo --affected CI on pull requests, and a manual Linux/Windows/macOS check for native addon builds.
- Wrote repo-specific CODING_STANDARDS.md and GLOSSARY.md that measure the codebase's real conventions and inconsistencies, and wrote down a push-to-main incident with concrete git prevention steps.