Skip to content

Commit

Permalink
Preserve the processRequests and processHandles metrics
Browse files Browse the repository at this point in the history
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 <raisinten@gmail.com>
  • Loading branch information
RaisinTen authored and zbjornson committed Jan 22, 2022
1 parent 8841de4 commit 98b7ad8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion lib/defaultMetrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const metrics = {
eventLoopLag,
...(typeof process.getActiveResourcesInfo === 'function'
? { processResources }
: { processHandles, processRequests }),
: {}),
processHandles,
processRequests,
heapSizeAndUsed,
heapSpacesSizeAndUsed,
version,
Expand Down

0 comments on commit 98b7ad8

Please sign in to comment.