express-prom-bundle
Advanced tools
Comparing version 6.3.6 to 6.4.0
{ | ||
"name": "express-prom-bundle", | ||
"version": "6.3.6", | ||
"version": "6.4.0", | ||
"description": "express middleware with popular prometheus metrics in one bundle", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -83,6 +83,7 @@ [![build status](https://travis-ci.org/jochen-schweizer/express-prom-bundle.png)](https://travis-ci.org/jochen-schweizer/express-prom-bundle) [![Coverage Status](https://coveralls.io/repos/github/jochen-schweizer/express-prom-bundle/badge.svg?branch=master)](https://coveralls.io/github/jochen-schweizer/express-prom-bundle?branch=master) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://www.tldrlegal.com/l/mit) [![NPM version](https://badge.fury.io/js/express-prom-bundle.png)](http://badge.fury.io/js/express-prom-bundle) | ||
* **transformLabels**: `function(labels, req, res)` transforms the **labels** object, e.g. setting dynamic values to **customLabels** | ||
* **urlPathReplacement**: replacement string for the values (default: "#val") | ||
### Other options ### | ||
* **autoregister**: if `/metrics` endpoint should be registered. (Default: **true**) | ||
* **autoregister**: if `/metrics` endpoint should be registered (default: **true**) | ||
* **promClient**: options for promClient startup, e.g. **collectDefaultMetrics**. This option was added | ||
@@ -89,0 +90,0 @@ to keep `express-prom-bundle` runnable using confit (e.g. with kraken.js) without writing any JS code, |
@@ -14,2 +14,3 @@ 'use strict'; | ||
let path = url.parse(req.originalUrl || req.url).pathname; | ||
const urlPathReplacement = opts ? opts.urlPathReplacement : '#val'; | ||
@@ -30,3 +31,3 @@ const normalizePath = opts && opts.normalizePath; | ||
} | ||
return urlValueParser.replacePathValues(path); | ||
return urlValueParser.replacePathValues(path, urlPathReplacement); | ||
}; |
@@ -32,2 +32,4 @@ // TypeScript Version: 2.8 | ||
excludeRoutes?: Array<string | RegExp>; | ||
metricType?: 'summary' | 'histogram'; | ||
@@ -34,0 +36,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22838
276
269