@evo/cantal-js
v0.3.0
Published
A nodejs library for cantal
Downloads
15
Readme
cantal-js
Will collect metrics from your nodejs application
Usage example
import cantal from '@evo/cantal-js';
const requests = new cantal.Counter({
group: "incoming",
metric: "requests"
});
createServer((req, res) => {
requests.incr();
})
// need to be called somewhere once
cantal.start();
ENV
CANTAL_PATH
- path for storing metrics
Metrics
Counter
const requests = new cantal.Counter({
group: "incoming",
metric: "requests"
});
requests.incr();
Integer
const memory = new cantal.Integer({
group: "v8-stats",
metric: "malloced_memory"
});
memory.set(stats.memory);
// memory.incr();
// memory.decr();
V8 metrics
Some v8 metrics will be collected by default in group v8-stats
new_space_used_size
- heap new space used sizeold_space_used_size
- heap old space used sizecode_space_used_size
- heap code space used sizemap_space_used_size
- heap map space used sizelarge_object_space_used_size
- heap large object space used sizemalloced_memory
- allocated memory for the process
Details for collected metrics here