This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-04
Channels
- # announcements (7)
- # babashka (26)
- # babashka-sci-dev (19)
- # beginners (66)
- # calva (4)
- # clj-kondo (55)
- # cljs-dev (173)
- # cljsrn (17)
- # clojure (86)
- # clojure-art (3)
- # clojure-australia (1)
- # clojure-europe (24)
- # clojure-india (1)
- # clojure-nl (3)
- # clojure-uk (6)
- # clojured (5)
- # clojurescript (39)
- # cursive (8)
- # data-oriented-programming (20)
- # datomic (9)
- # emacs (10)
- # events (1)
- # figwheel-main (16)
- # fulcro (33)
- # gratitude (1)
- # helix (2)
- # hugsql (2)
- # jobs (2)
- # kaocha (4)
- # leiningen (5)
- # lsp (110)
- # malli (1)
- # missionary (17)
- # observability (3)
- # re-frame (10)
- # reagent (1)
- # reitit (7)
- # rewrite-clj (3)
- # shadow-cljs (63)
- # sql (19)
- # tools-build (74)
- # tools-deps (32)
- # transit (1)
- # xtdb (5)
I'm looking into moving our observability pipeline from statsd to prometheus - so far https://github.com/clj-commons/iapetos looks great, but one thing bugs me: why do I have to define metrics upfront? Is there a way of adding them dynamically that doesn't involve rebuilding the registry all the time? I tried to find answer for this and there's no clear answer anywhere or my google-fu is simply not good enough. thx 🙏
what do you mean by rebuilding a registry? the registry is initialized with collectors and you can hold a reference to a collector and register metrics to that, mutably/dynamically
The readme clearly states: https://github.com/clj-commons/iapetos#registering-metrics "All metrics have to be registered with a collector registry before being used" - so that's pretty clear to me that I need to know all metrics upfront. For the most part that's how we use statsd, but we also have a http router that creates metrics for all routes automatically, so generate all metric keys when the route configuration is read. I realize I can hook into the metric registration process but it will weirdly couple the metric collector with our router.