Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
prometheus-gc-stats
Advanced tools
Readme
Report Garbage Collection stats using Prometheus
This module has a peer dependency on prom-client
. Currently, 10-14 is supported.
Note that version 12 and up of prom-client
comes with GC metrics out of the box, so this module might not be needed. See this comment.
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. If no registry is provided it will use the default one provided by prom-client
.
Example:
const prometheus = require('prom-client');
const gcStats = require('prometheus-gc-stats');
prometheus.collectDefaultMetrics();
const startGcStats = gcStats(prometheus.register); // gcStats() would have the same effect in this case
startGcStats();
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.
This module exposes 3 metrics:
nodejs_gc_runs_total
: Counts the number of time GC is invokednodejs_gc_pause_seconds_total
: Time spent in GC in secondsnodejs_gc_reclaimed_bytes_total
: The number of bytes GC has freedYou can add a prefix to metric names using options:
const startGcStats = gcStats(prometheus.register, {
prefix: 'my_application_',
});
Thanks to @tcolgate for the original implementation.
FAQs
Report Garbage Collection stats using Prometheus
The npm package prometheus-gc-stats receives a total of 58,652 weekly downloads. As such, prometheus-gc-stats popularity was classified as popular.
We found that prometheus-gc-stats demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.