Will collect metrics from your nodejs application
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();
CANTAL_PATH
- path for storing metrics
const requests = new cantal.Counter({
group: "incoming",
metric: "requests"
});
requests.incr();
const memory = new cantal.Integer({
group: "v8-stats",
metric: "malloced_memory"
});
memory.set(stats.memory);
// memory.incr();
// memory.decr();
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