
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.
A Javascript client library for statsum.
Usage:
let Statsum = require('statsum');
// Create a client object
let configurer = async (project) => {
// this might be fetched remotely, for example
return {
// project name to which stats should be sent
project: 'example-project',
// base URL (hostname only) of the statsum server
// NOTE: this is unrelated to the taskcluster "baseUrl"
baseUrl: 'https://statsum.example.com',
// access token
token: 'KEY',
// expiration date (before which configurer will be called again)
expires: new Date().toJSON()
}
};
let statsum = new Statsum(configurer, {project: 'test'});
// Send metrics
statsum.count('my-counter', 1);
statsum.measure('my-timer', 500);
// Create a child client (enforcing a prefix)
let child = statsum.prefix('child');
child.count('my-counter', 1); // submitted as 'child.my-counter'
child.measure('my-timer', 500); // submitted as 'child.my-timer'
// Send tagged metrics
statsum.measure({region: 'us-west-1', method: 'get'}, 542);
// Will be reported 4 time, the equivalent of:
statsum.measure('region:us-west-1.method:get', 542);
statsum.measure('all-region.method:get', 542);
statsum.measure('region:us-west-1.all-method', 542);
statsum.measure('all-region.all-method', 542);
// Use this feature with care, too many tags and the number of metrics explodes.
FAQs
Client library for statsum
The npm package statsum receives a total of 12 weekly downloads. As such, statsum popularity was classified as not popular.
We found that statsum demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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.