
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@flowio/metrics
Advanced tools
@flowio/metricsModule to send metrics to Hosted Graphite from Flow NodeJS applications. Built in support for automated metrics sent at a defined interval.
import FlowMetrics from '@flowio/metrics';
const flowMetrics = new FlowMetrics({
serverHost: 'carbon.hostedgraphite.com', // host of graphite server
serverPort: 2003, // port of graphite server
hgApiKey: 'super-secret-key', // hosted graphite api-key
environment: 'production', // environment (production | development | test)
appName: 'app-name', // application name
disableAuto: true, // disable autmoatic system metrics (optional)
collectionInterval: 10000, // interval for automatic metrics in ms (optional, default 10000)
});
If you do not pass disableAuto: true the module will automatically send metrics after a delay of collectionInterval milliseconds (default: 10000);
All metrics are expanded into the graphite standard of dot delimited metric names, including the Hosted Graphite API key, for example:
hg-api-key.environment.application-name.hostname.os.memory
default auto metrics are:
{
os: {
memory: {
total: 12340000,
free: 10240000
},
cpu: {
cpu: 40;
user: 20;
nice: 0;
sys: 20;
idle: 60;
irq: 0
}
disk: {
available: 30000000;
free: 25000000;
total: 40000000;
}
}
}
Custom metrics can be sent using:
flowMetrics.sendMetrics({
metrics: { ... },
timestamp: Date.now(), // optional
callback: () => {} // callback method
})
FAQs
Flow Library for sending app metrics to Hosted Graphite
We found that @flowio/metrics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.