fix(backend): removed prometheus http calls from requests_total metric
This commit is contained in:
parent
fc73d0285d
commit
ca97151e32
1 changed files with 4 additions and 2 deletions
|
|
@ -44,9 +44,11 @@ const request_logger = (identity) => {
|
|||
const startTs = performance.now(); // millis
|
||||
res.on('finish', function () {
|
||||
const duration = performance.now() - startTs;
|
||||
IncreaseTotalRequests();
|
||||
let route = req.originalUrl.split('/')[3];
|
||||
if (route !== undefined) {
|
||||
IncreaseTotalRequests();
|
||||
RecordRequestDuration(req.method, route, this.statusCode, duration);
|
||||
}
|
||||
if (this.statusCode !== 200 || debug) {
|
||||
console.log(new Date().toTimeString(), 'RESPONSE', req.method, req.originalUrl, this.statusCode);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue