Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-prom-bundle

Package Overview
Dependencies
Maintainers
1
Versions
56
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 1.2.0 to 1.2.1

2

package.json
{
"name": "express-prom-bundle",
"version": "1.2.0",
"version": "1.2.1",
"description": "express middleware with popular prometheus metrics in one bundle",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -119,3 +119,3 @@ [![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)

* **1.2.0**
* **1.2.1**
* upgrade prom-client to 6.1.2

@@ -122,0 +122,0 @@ * add options: includeMethod, includePath, keepDefaultMetrics

"use strict";
const UrlValueParser = require("url-value-parser");
const url = require("url");
let urlValueParser;

@@ -8,4 +9,10 @@

opts = opts || {};
// originalUrl is taken, because url and path can be changed
// by middlewares such as "router". Note: this function is called onFinish
/// i.e. always in the tail of the middleware chain
const path = url.parse(req.originalUrl).pathname;
if (opts.normalizePath !== undefined && !opts.normalizePath) {
return req.path;
return path;
}

@@ -15,6 +22,7 @@ if (typeof opts.normalizePath === "function") {

}
if (!urlValueParser) {
urlValueParser = new UrlValueParser();
}
return urlValueParser.replacePathValues(req.path);
return urlValueParser.replacePathValues(path);
};
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