Socket
Socket
Sign inDemoInstall

express-prom-bundle

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-prom-bundle - npm Package Compare versions

Comparing version 6.3.6 to 6.4.0

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc