We have lot's of issue recently when we add metric, instrument and it's not actually registered 🤦♂️ e.g #2100
That's enough. I am looking on a mandatory way to test if ALL metrics are actually registered when you start Thanos binary.
Some ideas:
A) Mandatory unit test for all Metrics structs with Registerer that checks what was registered.
- More automated?
B) Grep for all metrics creations and check e2e tests if /metrics shows them (kind of primitive)
C) New** methods for Prometheus client that registers metrics in custom registery
D) Wrap prometheus client library with something that allows checking if New* method that creates metrics has the corresponding metrics in Registered. (weird)
Any hints on how to do it, @brian-brazil @beorn7 @brancz ? I think C makes sense the most + add item to CONTRIBUTING.md
We have lot's of issue recently when we add metric, instrument and it's not actually registered 🤦♂️ e.g #2100
That's enough. I am looking on a mandatory way to test if ALL metrics are actually registered when you start Thanos binary.
Some ideas:
A) Mandatory unit test for all Metrics structs with Registerer that checks what was registered.
B) Grep for all metrics creations and check e2e tests if
/metricsshows them (kind of primitive)C) New** methods for Prometheus client that registers metrics in custom registery
D) Wrap prometheus client library with something that allows checking if
New*method that creates metrics has the corresponding metrics in Registered. (weird)Any hints on how to do it, @brian-brazil @beorn7 @brancz ? I think
Cmakes sense the most + add item to CONTRIBUTING.md