Request Content Length null or undefined
Closed this issue · 2 comments
oghcfb commented
https://github.com/slanatech/swagger-stats/blob/master/lib/swsAPIStats.js
this.promClientMetrics.api_response_size_bytes.labels(req.method,req.sws.api_path,res.statusCode).observe(req.sws.res_clength);
TypeError: Invalid value: is not number
bug - req.sws.res_clength
https://github.com/slanatech/swagger-stats/blob/master/lib/swsCoreStats.js
if ("_contentLength" in res){
resContentLength = res['_contentLength'];
}else{
// Try header
if(res.hasHeader('content-length')) {
resContentLength = res.getHeader('content-length');
}
}
resContentLength - Null or Undefined
sv2 commented
Addressed in v0.95.6