* cmd: update prometheus.NewProcessCollector args. There's a new struct `prometheus.ProcessCollectorOpts` that is expected to be used as the sole argument to `prometheus.NewProcessCollector`. We don't need to specify `os.Getpid` as the `PidFn` of the struct because the default is to assume `os.Getpid`. Similarly we don't need to set the namespace to `""` explicitly, it is the default. * SA: reimplement db metrics as custom collector. The modern Prometheus golang API supports translating between legacy metric sources on the fly with a custom collector. We can use this approach to collect the metrics from `gorp.DbMap`'s via the `sql.DB` type's `Stats` function and the returned `sql.DbStats` struct. This is a cleaner solution overall (we can lose the DB metrics updating go routine) and it avoids the need to use the now-removed `Set` method of the `prometheus.Counter` type. * test: Update CountHistogramSamples. The `With` function of `prometheus.HistogramVec` types we tend to use as the argument to `test.CountHistogramSamples` changed to return a `prometheus.Observer`. Since we only use this function in test contexts, and only with things that cast back to a `prometheus.Histogram` we take that approach to fix the problem without updating call-sites. |
||
|---|---|---|
| .. | ||
| quantile | ||
| LICENSE | ||