fix code labels in histogram

This commit is contained in:
Konstantin Pogorelov
2016-04-19 10:14:52 +02:00
parent 5ead531a59
commit 7e9f42d9d0
3 changed files with 3 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
test:
./node_modules/jasme/run.js
lint:
node_modules/eslint/bin/eslint.js .
node_modules/eslint/bin/eslint.js src

View File

@@ -1,6 +1,6 @@
{
"name": "express-prom-bundle",
"version": "1.1.0",
"version": "1.1.1",
"description": "express middleware with popular prometheus metrics in one bundle",
"main": "src/index.js",
"keywords": [

View File

@@ -61,7 +61,6 @@ function main(opts) {
"http_request_duration",
"number of http responses labeled with status code",
{
labels: ["bar"],
buckets: [0.003, 0.03, 0.1, 0.3, 1.5, 10]
}
);
@@ -87,8 +86,8 @@ function main(opts) {
let timer, labels;
if (metrics["http_request_duration"]) {
timer = metrics["http_request_duration"].startTimer(labels);
labels = {"status_code": 0};
timer = metrics["http_request_duration"].startTimer(labels);
}
if (req.path == "/metrics") {