[bug] Revert metric, deleted after merge 724583100b619b2d11cbc44adaf7f47e7aaa894f; Fix bug 71746

This commit is contained in:
Sergey Konovalov
2024-11-19 17:05:22 +03:00
parent 1daa5895f3
commit a095b0b5c9

View File

@ -1767,6 +1767,13 @@ exports.install = function(server, callbackFunction) {
ctx.logger.debug("unknown command %j", data);
break;
}
if (clientStatsD) {
let isSendMetric = 'auth' === data.type || 'getLock' === data.type || 'saveChanges' === data.type;
if (isSendMetric) {
clientStatsD.timing('coauth.data.' + data.type, new Date() - startDate);
}
}
} catch (e) {
ctx.logger.error("error receiving response: type = %s %s", (data && data.type) ? data.type : 'null', e.stack);
}