JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28553
  • Score
    100M100P100Q174422F
  • License MIT

Report Garbage Collection stats using Prometheus

Package Exports

  • prometheus-gc-stats

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (prometheus-gc-stats) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

prometheus-gc-stats

Report Garbage Collection stats using Prometheus

NPM Version Build Status

Dependency Status Optional Dependency Status Peer Dependency Status Dev Dependency Status Greenkeeper badge

Usage

This module has a peer dependency on prom-client. Currently, 10 is supported.

This module follows the same API as the core default metrics. To start collection GC stats, invoke the exported function to create the metrics, then invoke the returned function to start the collecting.

The exported function takes a single parameter, which is a registry. If provided, and the version of prom-client you use support it, that is the registry which the metrics will register to.

gc-stats

The module doing the GC stats collecting is gc-stats. This module requires native dependencies. If the stats don't show up, make sure to check npm's install log for failures.

Metrics exposed

This module exposes 3 metrics:

  1. nodejs_gc_runs_total: Counts the number of time GC is invoked
  2. nodejs_gc_pause_seconds_total: Time spent in GC in seconds
  3. nodejs_gc_reclaimed_bytes_total: The number of bytes GC has freed

Credits

Thanks to @tcolgate for the original implementation.