From b04c7d2ffe08922794049c2b1d5363f2f33d2f38 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 30 Jul 2018 18:16:52 +0100 Subject: [PATCH] send clsi response codes to graphite --- services/web/app/coffee/Features/Compile/ClsiManager.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/web/app/coffee/Features/Compile/ClsiManager.coffee b/services/web/app/coffee/Features/Compile/ClsiManager.coffee index 9a4e61a063..59822c7547 100755 --- a/services/web/app/coffee/Features/Compile/ClsiManager.coffee +++ b/services/web/app/coffee/Features/Compile/ClsiManager.coffee @@ -100,6 +100,7 @@ module.exports = ClsiManager = timer = new Metrics.Timer("compile.currentBackend") request opts, (err, response, body)-> timer.done() + metrics.inc "compile.currentBackend.response.#{response.statusCode}" if err? logger.err err:err, project_id:project_id, url:opts?.url, "error making request to clsi" return callback(err) @@ -111,6 +112,7 @@ module.exports = ClsiManager = newBackend: (cb)-> startTime = new Date() ClsiManager._makeNewBackendRequest project_id, opts, (err, response, body)-> + metrics.inc "compile.newBackend.response.#{response.statusCode}" cb(err, {response:response, body:body, finishTime:new Date() - startTime}) }, (err, results)-> timeDifference = results.newBackend?.finishTime - results.currentBackend?.finishTime