mirror of
https://github.com/BreizhHardware/express-prom-bundle.git
synced 2026-03-18 21:30:38 +01:00
fix code labels in histogram
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,4 +1,4 @@
|
||||
test:
|
||||
./node_modules/jasme/run.js
|
||||
lint:
|
||||
node_modules/eslint/bin/eslint.js .
|
||||
node_modules/eslint/bin/eslint.js src
|
||||
|
||||
@@ -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": [
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user