Swirrl / drafter

A clojure service and a client to it for exposing data management operations to PMD
Other
0 stars 0 forks source link

Replace cognician/dogstatsd with swirrl/dogstatsd #545

Open RickMoynihan opened 2 years ago

RickMoynihan commented 2 years ago

I forked cognician/dogstatsd which we use in drafter to a new project https://github.com/Swirrl/dogstatsd

This fork was created when I wanted to integrate muttnik with dogstatsd (see this PR: https://github.com/Swirrl/muttnik/pull/1339), and ran into the issue where cognician/dogstatsd brings its own implicit singleton client to the party.

The main problem this brings in drafter is that you need to hack it to work well with integrant config. The hack we use in drafter is to automatically inject it into every other integrant component to force it to be configured before all others. The ugly thing is, that the components then don't actually use the statsd client they've been given at all.

I didn't want to include a similar hack in muttnik; which has quite a lot of existing complexity around its integrant setup, so decided to do it properly by forking the project and making a breaking change to its API such that the "client" is an explicit parameter on all the reporters.

This is a low priority "tech debt" ticket, where we can update drafter to use the new improved dogstatsd client, and remove our integrant hack.

ricroberts commented 1 year ago

@lkitching do you know if this is still applicable - I seem to recall rick saying his fork was redundant now (but i might have got the wrong end of the stick)

lkitching commented 1 year ago

I can't see anything in the swirrl/dogstatsd project to suggest it's no longer relevant, and the APIs of the two projects are still different. Drafter still depends on cognician/dogstatsd so it looks like this issue is still required.