Fork me on GitHub
#announcements
<
2022-01-05
>
rickmoynihan09:01:34

I don’t think I announced this 3 months ago but we forked dogstatsd-clj here. It is a statsd client, with support for the datadog dogstatsd extensions; the non-datadog specific stuff should also work with other statsd systems, e.g. graphite… https://github.com/Swirrl/dogstatsd It makes a few improvements to the original; most notably not using a singleton client for the connection, which makes it much less opinionated and easier to use in component systems e.g. integrant, component etc. This required making a breaking change to the original library; hence it being a fork.

👀 6
🎉 2
robert-stuttaford10:01:58

nice work! we may end up switching to your version 😁 also, not sure if your update accounts for this or not, but it looks like we missed this Issue: https://github.com/Cognician/dogstatsd-clj/issues/5

borkdude12:01:55

This dependency also works with #babashka btw :)

$ bb -cp $(clojure -Spath -Sdeps '{:deps {org.babashka/spec.alpha {:git/url "" :git/sha "1a841c4cc1d4f6dab7505a98ed2d532dd9d56b78"}}}'):test -e "(require '[swirrl.dogstatsd-test]) (clojure.test/run-tests 'swirrl.dogstatsd-test)"

Testing swirrl.dogstatsd-test

Ran 1 tests containing 1 assertions.
0 failures, 0 errors.
{:test 1, :pass 1, :fail 0, :error 0, :type :summary}
@U0JEFEZH6 is running a similar thing with bb on their nodes.

rickmoynihan12:01:32

Yes I would have expected it probably would :thumbsup: I would mention it in the README, but as it stands there’s no CI setup here, and without CI testing it under bb it I’m not 100% comfortable making the claim that it will remain that way… though I don’t expect any major changes to the library anytime soon

borkdude12:01:45

I already made an issue about it on the bb side, we test a lot of libraries on bb's CI., https://github.com/babashka/babashka/issues/1128 If you're open to receiving a github actions config, I can setup both clj + bb tests.

borkdude12:01:46

You can introduce bb reader conditionals or just drop bb support at any time of course. We'll just fork the lib if necessary if people find it useful. But you can also use bb reader conditionals to support bb separately from clojure in case of incompatible changes.

rickmoynihan12:01:30

I’m certainly open to seeing it; but I wouldn’t want to waste your valuable time, as we’re currently using circleci for some of our other builds, with some older stuff on travis (probably to be migrated at some point) — and I’d rather not have to introduce a 3rd CI into the mix. That said we have started using GH actions for some checks, so might not be that big a deal… I’d still like to keep the cognitive overhead down for everyone though

borkdude12:01:45

I'm also familiar and even a fan of CircleCI, that wouldn't be a dealbreaker to me. But it's ok, I'll just test it at the bb side and if things will break, then we'll just improve bb in the best way we can ;)

rickmoynihan12:01:13

I’m not sure it’s a dealbreaker for me to be honest 🙂 Tell you what, if you are still happy to contribute the GHA — I’ll merge it and if/when we do move to circle, I’ll promise to also include bb support in the tests (and maintain it as best I can)🙂

borkdude12:01:49

sounds good

🙌 1
🙇 1
lukasz15:01:07

Oh nice, our statsd client implementation is very simple, but also supports only the bare minimum statsd protocol (so no DataDog extensions like tags etc).

borkdude17:01:40

please squash the commits into one (github has a squash/merge option)

rickmoynihan17:01:49

Wow amazing, thank you so much! I’ll take a proper look at it on monday as I’m about to finish for the day 🙇

lukasz18:01:11

@U06HHF230 also, if it helps - our (other) Statsd client (which wraps DD's Java lib) runs a "real" UDP server so we can ensure all metrics are sent correctly over the wire, you can find it here: https://github.com/nomnom-insights/nomnom.stature/blob/master/test/stature/helper/statsd_server.clj

rickmoynihan09:01:55

@U0JEFEZH6 Thanks. I did consider doing something like that, it just didn’t feel worth it at the time — given that it had no tests prior to forking it. The main thing adding the tests was intended to catch was just dumb stuff like syntax errors and calling functions wrongly. So there are also some specs that test the inputs to format-metric are correct, which I think give a slightly bigger bang per buck than just asserting the string you sent can be received over UDP, though I’d certainly be happy to have a test for that and a few other things. Unfortunately most of the complexity and testing here is in making sure the metric events are interpreted as expected in your metrics system, and there’s not really a good automated way to do that; at least not one that feels worth the complexity cost.

alexmiller18:01:21

https://clojure.org/releases/tools#v1.10.3.1058 is now available • https://clojure.atlassian.net/browse/TDEPS-207 Fix deadlock in version range resolution • https://clojure.atlassian.net/browse/TDEPS-215 Fix race condition during parallel loading of s3 transporter • Don’t track local deps.edn manifest for caching if deps project doesn’t have one • Update maven-core to 3.8.4, aws libs, tools.build, tools.tools to latest • Use https://github.com/clojure/tools.deps.alpha/blob/master/CHANGELOG.md 0.12.1109

🎉 22