From 536f52ee3d7c560edd9162f3a966f17b87d7386f Mon Sep 17 00:00:00 2001 From: Sergey Peshkov Date: Wed, 25 Sep 2019 23:18:58 +0300 Subject: [PATCH 1/3] fix(metrics): added request metrics path --- lib/endpoints_metrics.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/endpoints_metrics.js b/lib/endpoints_metrics.js index e77f3030..51b36299 100644 --- a/lib/endpoints_metrics.js +++ b/lib/endpoints_metrics.js @@ -8,15 +8,16 @@ const endpointsRegistry = new Registry(); const responseCounter = new Counter({ name: 'discounts_requests_total', help: 'Amount of total HTTP requests', - labelNames: ['status', 'endpoint', 'method'], + labelNames: ['status', 'endpoint', 'method', 'path'], registers: [endpointsRegistry] }); exports.addEndpointMetrics = async (req, res, next) => { const callbackOnFinished = () => { const labelsObject = { + endpoint: req.baseUrl + req.path, status: res.statusCode, - endpoint: req.originalUrl, + path: req.originalUrl, method: req.method }; From d1607e3f7703fd23f058f64b10d4ef6204c99e7a Mon Sep 17 00:00:00 2001 From: Sergey Peshkov Date: Wed, 25 Sep 2019 23:19:33 +0300 Subject: [PATCH 2/3] fix(deps): fix npm audit vulnerabilities report --- package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index de0ca3df..2b6a0a11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4194,9 +4194,9 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.3.1.tgz", + "integrity": "sha512-c0HoNHzDiHpBt4Kqe99N8tdLPKAnGCQ73gYMPWtAYM4PwGnf7xl8PBUHJqh9ijlzt2uQKaSRxbXRt+rZ7M2/kA==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -6091,9 +6091,9 @@ "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, "neo-async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", - "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, "nested-error-stacks": { @@ -8733,9 +8733,9 @@ } }, "uglify-js": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.9.tgz", - "integrity": "sha512-WpT0RqsDtAWPNJK955DEnb6xjymR8Fn0OlK4TT4pS0ASYsVPqr5ELhgwOwLCP5J5vHeJ4xmMmz3DEgdqC10JeQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", + "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", "dev": true, "optional": true, "requires": { From 4202d58a7b6b601dc6fef9cf0cbd9630140e01bd Mon Sep 17 00:00:00 2001 From: Sergey Peshkov Date: Wed, 25 Sep 2019 23:19:37 +0300 Subject: [PATCH 3/3] chore(release): bumped version to 0.9.1 --- CHANGELOG.md | 11 +++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0a0a2a5..4d9f2df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## [0.9.1](https://github.com/AEGEE/oms-discounts/compare/0.9.0...0.9.1) (2019-09-25) + + +### Bug Fixes + +* **deps:** fix npm audit vulnerabilities report ([d1607e3](https://github.com/AEGEE/oms-discounts/commit/d1607e3)) +* **metrics:** added request metrics path ([536f52e](https://github.com/AEGEE/oms-discounts/commit/536f52e)) +* **test:** fix flapping tests ([582171e](https://github.com/AEGEE/oms-discounts/commit/582171e)) + + + # [0.9.0](https://github.com/AEGEE/oms-discounts/compare/0.8.1...0.9.0) (2019-09-22) diff --git a/package-lock.json b/package-lock.json index 2b6a0a11..16620217 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "oms-discounts", - "version": "0.9.0", + "version": "0.9.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index afa15692..ee4ead06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oms-discounts", - "version": "0.9.0", + "version": "0.9.1", "description": "Discounts module for OMS, for populating codes and for distributing them to AEGEE members.", "main": "lib/run.js", "scripts": {