From e1c4d3d92f3b02ebf7130c34fcedb4ef26470161 Mon Sep 17 00:00:00 2001 From: Maha Benzekri Date: Tue, 14 May 2024 16:56:03 +0200 Subject: [PATCH] fixups post reviews --- utils/monitoring.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/monitoring.js b/utils/monitoring.js index 42008da3..c7ec7be6 100644 --- a/utils/monitoring.js +++ b/utils/monitoring.js @@ -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')) @@ -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) { @@ -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);