A statsd library in Elixir: ExStatsTracker

Andrew Mager ♫
Postmates
Published in
1 min readJun 20, 2017

Here at Postmates, we instrument and monitor everything; from the HTTP status code health of our internal API endpoints, to the number of ongoing deliveries at any given time, to the mean latency of our tablet pings.

A day’s worth of deliveries

We’ve used the statsd client for years in our Python applications to send data to Wavefront. As we built more systems with Elixir, we needed a statsd solution in that language that supported batch stat flushes, which helps us avoid file descriptor exhaustion. The existing libraries didn’t have this critical property. So we went ahead and wrote one that did.

We are happy to announce our open-source Elixir statsd library, ExStatsTracker, built by our newly formed Platform team.

It’s super easy to set up. Just add this to config.ex in your Elixir app:

Here’s are some examples of how you can track stats with ExStatsTracker:

As always, we encourage you to contribute to this library by forking it and sending us a pull request.

If you’re interested in building the future of local commerce with us, we’d love to work with you. We’re hiring across the full stack: check out our jobs page for more info.

--

--

Andrew Mager ♫
Postmates

Full Stack Engineer at @Uber. Blogger turned coder. Music charms the soul. On Twitter: @mager.