prom-client
Advanced tools
Changelog
[15.1.3] - 2024-06-27
Changelog
[15.1.0] - 2023-12-15
osMemoryHeapLinux
hashObject
by using pre-sorted array of label namescollectDefaultMetrics.metricsList
histogram.startTime()
to be used with exemplars.Changelog
[15.0.0] - 2023-10-09
Content-Encoding: gzip
header.escapeString
helper in lib/registry.js
to improve performance and
avoid an unnecessarily complex regex.setToCurrentTime()
to reflect units as seconds.Changelog
[14.2.0] - 2023-03-06
getMetricAsPrometheusString
method in the Registry
class to use Array.prototype.join
instead of loop of string concatenations.Array.prototype.map
, and object spread instead of an explicit for
loopexample/default-metrics.js
summary
metrics now has a pruneAgedBuckets
config parameter
to remove entries without any new values in the last maxAgeSeconds
.
Default is false
(old behavior)get
method to type definitions of metric classesChangelog
[14.1.1] - 2022-12-31
rollup
by making perf_hooks optional in gc.jsChangelog
[14.1.0] - 2022-08-23
types: converted all the generic Metric types to be optional
The done()
functions returned by gauge.startTimer()
and
summary.startTimer()
now return the timed duration. Histograms already had
this behavior.
types: fixed type for registry.getMetricsAsArray()
Improve performance of gague.inc()
and gauge.dec()
by calling hashObject()
once.
The processResources
metric was added, which keeps a track of all sorts of
active resources. It consists of the following gauges:
nodejs_active_resources
- Number of active resources that are currently
keeping the event loop alive, grouped by async resource type.nodejs_active_resources_total
- Total number of active resources.
It is supposed to provide the combined result of the processHandles
and
processRequests
metrics along with information about any other types of
async resources that these metrics do not keep a track of (like timers).Support gzipped pushgateway requests