From 98b7ad819978436b19a994bb5c9f7bcf7576578a Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Sun, 16 Jan 2022 14:03:37 +0530 Subject: [PATCH] Preserve the `processRequests` and `processHandles` metrics The `processResources` metrics depend on the `process.getActiveResourcesInfo()` API which is still experimental, so we shouldn't remove the existing metrics in favour of that quite yet. Signed-off-by: Darshan Sen --- CHANGELOG.md | 12 +++++++----- lib/defaultMetrics.js | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10cd57f8..0ac13a33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,14 +23,16 @@ project adheres to [Semantic Versioning](http://semver.org/). causing vscode to think that push/pushAdd and delete didn't promise resulting in incorrect behavior. -- The `processHandles` and `processRequests` metrics were replaced by the more - advanced `processResources` metric, which keeps a track of all sorts of active - resources. It consists of the following gauges: +### Added + +- 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. - -### Added + 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). ## [14.0.0] - 2021-09-18 diff --git a/lib/defaultMetrics.js b/lib/defaultMetrics.js index 07dd05c8..f285981a 100644 --- a/lib/defaultMetrics.js +++ b/lib/defaultMetrics.js @@ -26,7 +26,9 @@ const metrics = { eventLoopLag, ...(typeof process.getActiveResourcesInfo === 'function' ? { processResources } - : { processHandles, processRequests }), + : {}), + processHandles, + processRequests, heapSizeAndUsed, heapSpacesSizeAndUsed, version,