A minimalistic, zero-dependency StatsD client for Node.js supporting UDP and TCP transports.
dats is a minimalistic, zero-dependency StatsD client for Node.js that allows developers to send application metrics like counters, timings, gauges, and sets to a StatsD server. It solves the problem of writing boilerplate code for metric collection by providing a simple, compliant API with support for both UDP and TCP transports.
Node.js developers and teams who need a lightweight, efficient way to integrate StatsD-based metric collection into their applications, particularly those focused on performance monitoring and observability.
Developers choose dats for its zero-dependency design, which reduces bundle size and avoids conflicts, combined with features like buffered metrics, dynamic namespacing, and a built-in mock for testing, making it both simple and production-ready.
📈 Minimalistic zero-dependencies statsd client for Node.js
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Eliminates dependency bloat and conflicts, keeping the bundle minimal as emphasized in the README's feature list.
Supports both UDP for low-latency and TCP for reliable delivery, allowing users to choose based on network requirements.
Optional buffering batches metrics to reduce network overhead, with configurable buffer size and flush timeout for optimization.
Includes a mock client that captures sent metrics in an array, facilitating unit tests without a live StatsD server.
TCP usage requires an explicit connect() call, adding complexity and potential for connection errors if overlooked, as noted in the API section.
Only covers standard StatsD types (counter, timing, gauge, set), lacking newer types like histograms found in more comprehensive clients.
Relies on a simple onError callback without built-in retries or advanced logging, leaving robust error handling to the user.