Basic DogStatsD UDP/UDS server supporting gauges and counters and sending these metrics to Datadog.
libcurl
must be available on the system- Build the binary with
zig build
(build with Zig0.9.1
) - Set the environment variables
APIKEY
andHOSTNAME
to configure the daemon
- Launch the daemon and start sending it counters and gauges on port udp/8125
- Set the environment variable
UDS
to a filepath of the unix socket you want to use - Sends counters and gauges on this unix socket with a DogStatsD client
I've developed a custom memory allocator measuring how much memory is allocated while processing the metrics (see measure_allocator.zig).
Using this allocator, the memory is allocated, used, and forgotten for a while. When the total amount of allocated memory reaches a certain size, it is completely freed.
This provides two benefits:
- close to no time spent freeing memory
- you can easily configure the maximum amount of memory the server can use (set
MAX_MEM_MB
, default value 256)
Rémy 'remeh' Mathieu
This side-project is not endorsed in any way by Datadog.
MIT