Closed Pokom closed 10 months ago
One last thing I'd suggest is removing the usage of
log
(especially calling the global package functions) and instead replace it with an explicit dependency on*slog.Logger
. WDYT?
@inkel Plan is to add structured logging in a dedicated commit. See #32
Noice!
First commit in a series of commits to refactor the
Provider
interface to haveCollect
andDescribe
methods to implement the Prometheus Collector interface.This updates all of the mocked interfaces as well.
Why
The primary goal is to use the standard InstrumentMetricHandler method to export metrics. This requires your collector(s) to instrument the Collect interface so that you can pass in channels to emit metrics to. This will allow us to emit new metrics between runs and prevent us from exporting stale metrics.