sematext/spm-metrics-js

Inc is not increasing by whole number

Closed this issue · 0 comments

otisg commented

User report:
I'm using counter to inc value, but on the graph I see 0.7, 0.3 etc... not whole values, like 1,2,3

`let spmClient = new SPM(serviceConfig.spmToken, 15000);

let options = {name: 'Receipts.Raw', aggregation: 'sum', filter1: 'count', interval: 1000};
tbGlobal.meterRaw = spmClient.getCustomMetric (options);
tbGlobal.meterRaw.counter(0);
options.name = 'Receipts.Text';
tbGlobal.meterText = spmClient.getCustomMetric (options);
tbGlobal.meterText.counter(0);
options.name = 'Receipts.JSON';
tbGlobal.meterJSON = spmClient.getCustomMetric (options);
tbGlobal.meterJSON.counter(0);

//make total recipts count for today
tbGlobal.receiptMetric = spmClient.getCustomMetric ({name: 'Receipt.Total', aggregation: 'sum', filter1: 'count', interval: 1000});
tbGlobal.receiptMetric.counter(0);`