This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-23
Channels
- # adventofcode (21)
- # announcements (4)
- # babashka (35)
- # beginners (36)
- # calva (76)
- # cider (16)
- # clj-kondo (24)
- # clj-on-windows (12)
- # clojure (70)
- # clojure-europe (7)
- # clojure-nl (13)
- # clojure-spec (3)
- # clojure-uk (3)
- # clojurescript (34)
- # conjure (11)
- # cursive (22)
- # datomic (30)
- # deps-new (2)
- # emacs (36)
- # fulcro (28)
- # gratitude (4)
- # honeysql (16)
- # hugsql (8)
- # introduce-yourself (6)
- # jobs (1)
- # malli (4)
- # missionary (6)
- # off-topic (129)
- # other-languages (34)
- # polylith (3)
- # reagent (9)
- # reitit (27)
- # releases (13)
- # remote-jobs (1)
- # reveal (1)
- # shadow-cljs (2)
- # tools-build (3)
- # tools-deps (18)
- # web-security (7)
- # xtdb (4)
does anyone have any experience instrumenting hugsql? I want to throw some timings for SQL calls into statsd and I'm considering hacking up my own wrapper around def-db-fns
, so that I don't need to add a timing wrapper around every call site.
Usually drivers and/or connection pools help with that - e.g. hikaricp accepts a metric registry, it's based on Dropwizard metrics so it should be pretty flexible
oh right, yeah, thanks ... working at the level of the pool or the adapter probably makes more sense for timings and counts.
Might have to come back to this idea for doing traces & the execution hierarchy since that's not going to be just hugsql.
You can also turn the problem on its head and have slow query log setup in your database - a bit harder to tie it to the code, but requires no changes in your app
true ... unfortunately using a postgres appliance at DO so a bit limited in how much messing around with config I can do. Suppose there's a bunch that can be done from a psql session though.