Skip to content

Commit

Permalink
fixups post reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed May 14, 2024
1 parent a8ef839 commit e1c4d3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/monitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const consolidationDuration = (promClient.register.getSingleMetric('count_items_
name: 'count_items_consolidationDuration',
help: 'Duration of metrics consolidation in seconds',
labelNames: ['service'],
buckets: [0.1, 0.5, 1, 2, 5, 10],
buckets: [0.01, 0.05, 0.1, 0.2, 0.5, 1, 1.5, 2],
});

const workersCount = (promClient.register.getSingleMetric('count_items_workersCountErrors'))
Expand All @@ -53,7 +53,7 @@ const metricsCount = (promClient.register.getSingleMetric('count_items_metricsCo
});
/**
* @param {http.ServerResponse} res - http response object
* @param {errors.ArsenalError} error - Error code
* @param {Error | errors.ArsenalError} error - Error
* @return {void}
*/
function _writeResponse(res, error) {
Expand Down Expand Up @@ -92,7 +92,7 @@ async function metricsHandler(countMasterInstance, onScraped, req, res) {
'content-type': promClient.register.contentType,
}).end(promMetrics);
} catch (ex) {
return _writeResponse(res, errors.MethodNotAllowed);
return _writeResponse(res, ex);
} finally {
if (CountMaster.waitingForPromScraping === true) {
countMasterInstance.stop(null, onScraped);
Expand Down

0 comments on commit e1c4d3d

Please sign in to comment.