From 2696988acf84e456550078f11ca00dbd9150d07b Mon Sep 17 00:00:00 2001 From: Konstantin Pogorelov Date: Thu, 21 Apr 2016 11:01:11 +0200 Subject: [PATCH] rename duration histogram --- package.json | 2 +- src/index.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b851434..d7795b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-prom-bundle", - "version": "1.1.1", + "version": "1.1.2", "description": "express middleware with popular prometheus metrics in one bundle", "main": "src/index.js", "keywords": [ diff --git a/src/index.js b/src/index.js index 3a50492..2c75814 100644 --- a/src/index.js +++ b/src/index.js @@ -56,9 +56,9 @@ function main(opts) { "nodejs_memory_heap_used_bytes", "value of process.memoryUsage().heapUsed" ), - "http_request_duration": () => { + "http_request_seconds": () => { const metric = factory.newHistogram( - "http_request_duration", + "http_request_seconds", "number of http responses labeled with status code", { buckets: [0.003, 0.03, 0.1, 0.3, 1.5, 10] @@ -85,9 +85,9 @@ function main(opts) { let middleware = function (req, res, next) { let timer, labels; - if (metrics["http_request_duration"]) { + if (metrics["http_request_seconds"]) { labels = {"status_code": 0}; - timer = metrics["http_request_duration"].startTimer(labels); + timer = metrics["http_request_seconds"].startTimer(labels); } if (req.path == "/metrics") {