NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3521 most downloaded on npm
Client for prometheus
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 3 weeks to 10 months
Unknown
no stable releases
84 versions withdrawn
withdrawn after publishing
11 years old
84 releases · first in 2015
Improve error message on labels by @leftieFriele in #633
Full Changelog: v15.1.2...v15.1.3
One column per quarter.
Enable bun.js by catching NotImplemented errorby @owlcode in #624
bun.js by catching NotImplemented errorby @owlcode in #624Registry.PROMETHEUS_CONTENT_TYPE and Registry.OPENMETRICS_CONTENT_TYPE constants to the TypeScript types by @SimenB in #626contentType top level export by @SimenB in #625Full Changelog: v15.1.1...v15.1.2
Registry.PROMETHEUS_CONTENT_TYPE and Registry.OPENMETRICS_CONTENT_TYPE constants to the TypeScript typescontentType top level exportbun.js by catching NotImplemented error (Fixes #570)perf: improve the memory usage of histogram by @xsbchen in #606
Full Changelog: v15.1.0...v15.1.1
enableExemplars option is disabledremove unnecessary loop from osMemoryHeapLinux
osMemoryHeapLinuxhashObject by using pre-sorted array of label namescollectDefaultMetrics.metricsListhistogram.startTime() to be used with exemplars.Full Changelog: v15.0.0...v15.1.0
Support for OpenMetrics and Exemplars
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.Full Changelog: v14.2.0...v15.0.0
Nothing published for this version
Nothing published for this version
Refactor getMetricAsPrometheusString method in the Registry class to use Array.prototype.join instead of loop of string concatenations.
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.jssummary 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 classesFull Changelog: https://github.com/siimon/prom-client/compare/v14.1.1...v14.2.0
Fix incompatibility with perf_hooks accross nodejs versions by @Fadoli in https://github.com/siimon/prom-client/pull/515
perf_hooks accross nodejs versions by @Fadoli in https://github.com/siimon/prom-client/pull/515Full Changelog: https://github.com/siimon/prom-client/compare/v14.1.0...v14.1.1
rollup by making perf_hooks optional in gc.jstypes: converted all the generic Metric types to be optional
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
Full Changelog: https://github.com/siimon/prom-client/compare/v14.0.1...v14.1.0
Update pushgateway type def by @adilhafeez in https://github.com/siimon/prom-client/pull/469
Full Changelog: https://github.com/siimon/prom-client/compare/v14.0.0...v14.0.1
changed: linearBuckets does not propagate rounding errors anymore. Fewer bucket bounds will be affected by rounding errors. Histogram bucket labels ma
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
fix: fix DEP0152 deprecation warning in Node.js v16+.
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 1fix: push client attempting to write Promise (fixes #390)
labels() and remove()changed: The following functions are now async (return a promise): registry.metrics() registry.getMetricsAsJSON() registry.getMetricsAsArray() registr
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.getMetricAsPrometheusStringutils.getPropertiesFromObj with Object.valuescatch bindingsnumber in typescript instead of voidregistry.registerCollector() and registry.collectors() methods in TypeScript declarationexample/pushgateway.jsDropped the previously deprecated support for positional parameters in constructors, only the config object forms remain.
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 stringregistry.getMetricsAsJSON()registry.getMetrics*startTimer, when invoked returns the number of secondsprocess_start_time_secondsParameter compressCount in Summaries to control compression of data in t-digest.
compressCount in Summaries to control compression of data in t-digest.fix: avoid mutation bug in registry
fix: guard against missing constructor
Added timestamps toggle to collectDefaultMetrics options
timestamps toggle to collectDefaultMetrics optionsvalidateMetricNametimestamps toggle to collectDefaultMetrics optionsvalidateMetricNamenodejs_active_handles metric to the collectDefaultMetrics(). Unlike nodejs_active_handles_total it split count of active handles by type.
nodejs_active_handles metric to the collectDefaultMetrics(). Unlike nodejs_active_handles_total it split count of active handles by type.nodejs_active_requests metric to the collectDefaultMetrics(). Unlike nodejs_active_requests_total it split count of active requests by type.nodejs_active_handles metric to the collectDefaultMetrics(). Unlike nodejs_active_handles_total it split count of active handles by type.nodejs_active_requests metric to the collectDefaultMetrics(). Unlike nodejs_active_requests_total it split count of active requests by type.Check that cluster worker is still connected before attempting to query it for metrics.
remove() method on each metric type, based on Prometheus "Writing Client Libraries" section on labelsUpdated types for Summary in typescript definition file
Updated child dependency merge patch version to remove vulnerability.
merge patch version to remove vulnerability.benchmark suite which can be run with npm run benchmarks.Fixed performance by avoiding Object.assign on hot paths, as well as mutating objects when appropriate.
Object.assign on hot paths, as well as
mutating objects when appropriate.Object.assign on hot paths, as well as
mutating objects when appropriate.Allow setting Gauge values to NaN, +Inf, and -Inf
histogram scrape performance by using acc.push instead of acc.concat. Fixes #216 with #219histogram scrape performance by using acc.push instead of acc.concat. Fixes #216 with #219Fixed processOpenFileDescriptors metric when no custom config was set
processOpenFileDescriptors metric when no custom config was setprocessOpenFileDescriptors metric when no custom config was setAdded ability to set a name prefix in the default metrics
startTimer utility to not mutate objects passed as startLabelsCounter to validate labels parameter of inc() against initial
labelsetAggregatorFactory losing the aggregator method of metricsFixed gauge.setToCurrentTime() to use seconds instead of milliseconds
gauge.setToCurrentTime() to use seconds instead of milliseconds
gauge.setToCurrentTime() to use seconds instead of milliseconds
Fixed issue that registry.getMetricsAsJSON() ignores registry default labels
registry.getMetricsAsJSON() ignores registry default labelsregistry.getMetricsAsJSON() ignores registry default labelsFixed invalid process_virtual_memory_bytes reported under linux
process_virtual_memory_bytes reported under linuxOnly resolve/reject clusterMetrics promise if no callback is provided
clusterMetrics promise if no callback is providedDon't add event listeners if cluster module is not used.
reset to Counter and GaugeresetMetrics to register to calling reset of all metric instancesUpdate TypeScript definitions and JSDoc comments to match JavaScript sources
arguments in cluster codeSupport aggregating metrics across workers in a Node.js cluster.
Include invalid values in the error messages
Added registerMetric to definitions file
Don't poll default metrics every single tick
Metrics should be initialized to 0 when there are no labels
Print deprecation warning when metrics are constructed using non-objects
collectDefaultMetrics is called with a numberregistry as second argument to collectDefaultMetrics to
use that instead of the default registryutil-extend in favor of Object.assignthis in a variableprototype -> classDon't set timestamps for metrics that are never updated
Correct typedefs for object constructor of metrics
Support for object literals in metric constructors
collectDefaultMetrics().Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →