Releases: siimon/prom-client
v14.0.1
What's Changed
- Update pushgateway type def by @adilhafeez in #469
New Contributors
- @adilhafeez made their first contribution in #469
Full Changelog: v14.0.0...v14.0.1
v14.0.0
Breaking
-
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()
anddelete()
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
Changed
v13.2.0
Changed
- Don't add event listener to
process
if cluster module is not used. - fix: set labels for default memory metrics on linux.
- fix: fix DEP0152 deprecation warning in Node.js v16+.
- fix: Set aggregation mode for newer event loop metrics. (Fixes #418)
- Improve performance of/reduce memory allocations in Gauge.
Added
- feat: added
zero()
toHistogram
for setting the metrics for a given label combination to zero - fix: allow
Gauge.inc/dec(0)
without defaulting to 1
v13.1.0
[13.1.0] - 2021-01-24
Changed
- fix: push client attempting to write Promise (fixes #390)
- types: improve type checking of labels
- fix: Summary#observe should throw when adding additional labels to labelset (fixes #262)
Added
- feat: added the ability to pass labels as an object to
labels()
andremove()
- Added: More examples with commented output
13.0.0
[13.0.0] - 2020-12-16
Breaking
-
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 tores.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 acollect
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
andregistry.collectors()
. These have been removed. If you were using them,
you should instead provide acollect
function as described above.
Changed
- fix: provide nodejs_version_info metric value after calling
registry.resetMetrics()
(#238) - fix: provide process_max_fds metric value after calling
registry.resetMetrics()
- fix: provide process_start_time_seconds metric value after calling
registry.resetMetrics()
- chore: improve performance of
registry.getMetricAsPrometheusString
- chore: refactor metrics to reduce code duplication
- chore: replace
utils.getPropertiesFromObj
withObject.values
- chore: remove unused
catch
bindings - chore: upgrade Prettier to 2.x
- fix: startTimer returns
number
in typescript instead ofvoid
- fix: incorrect typings of `registry.getSingleMetric' (#388)
- chore: stop testing node v13 on CI
Added
- feat: exposed
registry.registerCollector()
andregistry.collectors()
methods in TypeScript declaration - Added: complete working example of a pushgateway push in
example/pushgateway.js
- feat: added support for adding labels to default metrics (#374)
- Added CHANGELOG reminder
12.0.0
Breaking
- Dropped support for end-of-life Node.js versions 6.x and 8.x
- Dropped the previously deprecated support for positional parameters in
constructors, only the config object forms remain. - Default metrics are collected on scrape of metrics endpoint, not on an
interval. Thetimeout
option tocollectDefaultMetrics(conf)
is no longer
supported or needed, and the function no longer returns aTimeout
object.
Changed
- chore: remove ignored package-lock.json
- fix:
process_max_fds
is process limit, not OS (#314) - Changed
Metric
labelNames & labelValues in TypeScript declaration to a generic typeT extends string
, instead ofstring
- Lazy-load Node.js Cluster module to fix Passenger support (#293)
- fix: avoid mutation bug in
registry.getMetricsAsJSON()
- fix: improve performance of
registry.getMetrics*
- End function of histogram
startTimer
, when invoked returns the number of seconds - chore: reindent package.json
- chore: correct var name in processStartTime
- chore: add test for
process_start_time_seconds
- chore: spelling corrections in README
Added
- feat: implement GC metrics collection without native(C++) modules.
- faet: implement advanced event loop monitoring
11.5.2
11.5.1
11.5.0
11.4.0
Added
nodejs_active_handles
metric to thecollectDefaultMetrics()
. Unlikenodejs_active_handles_total
it split count of active handles by type.nodejs_active_requests
metric to thecollectDefaultMetrics()
. Unlikenodejs_active_requests_total
it split count of active requests by type.