prom-client
Advanced tools
Changelog
[14.0.1] - 2021-11-02
Changelog
[14.0.0] - 2021-09-18
changed: linearBuckets
does not propagate rounding errors anymore.
Fewer bucket bounds will be affected by rounding errors. Histogram bucket
labels may change. 6f1f3b2
changed: The push gateway methods pushAdd()
, push()
and delete()
now
return Promises instead of accepting a callback:
// Old:
gateway.pushAdd({ jobName: 'test' }, (err, resp, body) => {});
// New:
gateway
.pushAdd({ jobName: 'test' })
.then(({ resp, body }) => {})
.catch(err => {});
// or
const { resp, body } = await gateway.pushAdd({ jobName: 'test' });
changed: The default nodejs_eventloop_lag_*
metrics are now reset every time
they are observed. This prevents these metrics from "stabilizing" over a long
period of time and becoming insensitive to small changes. For more info, see
#370. 0f444cd
Changelog
[13.2.0] - 2021-08-08
process
if cluster module is not used.zero()
to Histogram
for setting the metrics for a given label combination to zeroGauge.inc/dec(0)
without defaulting to 1Changelog
[13.1.0] - 2021-01-24
labels()
and remove()
Changelog
[13.0.0] - 2020-12-16
changed: The following functions are now async (return a promise):
registry.metrics()
registry.getMetricsAsJSON()
registry.getMetricsAsArray()
registry.getSingleMetricAsString()
If your metrics server has a line like res.send(register.metrics())
, you
should change it to res.send(await register.metrics())
.
Additionally, all metric types now accept an optional collect
function,
which is called when the metric's value should be collected and within which
you should set the metric's value. You should provide a collect
function for
point-in-time metrics (e.g. current memory usage, as opposed to HTTP request
durations that are continuously logged in a histogram).
changed: register.clusterMetrics()
no longer accepts a callback; it only
returns a promise.
removed: v12.0.0 added the undocumented functions registry.registerCollector
and registry.collectors()
. These have been removed. If you were using them,
you should instead provide a collect
function as described above.
registry.resetMetrics()
(#238)registry.resetMetrics()
registry.resetMetrics()
registry.getMetricAsPrometheusString
utils.getPropertiesFromObj
with Object.values
catch
bindingsnumber
in typescript instead of void
registry.registerCollector()
and registry.collectors()
methods in TypeScript declarationexample/pushgateway.js
Changelog
[12.0.0] - 2020-02-20
timeout
option to collectDefaultMetrics(conf)
is no longer
supported or needed, and the function no longer returns a Timeout
object.process_max_fds
is process limit, not OS (#314)Metric
labelNames & labelValues in TypeScript declaration to a generic type T extends string
, instead of string
registry.getMetricsAsJSON()
registry.getMetrics*
startTimer
, when invoked returns the number of secondsprocess_start_time_seconds
Changelog
[11.5.3] - 2019-06-27
compressCount
in Summaries to control compression of data in t-digest.