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.2 to 6.3.3

4

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

@@ -19,3 +19,3 @@ "main": "src/index.js",

"scripts": {
"test": "node_modules/jasme/run.js",
"test": "NODE_ENV=test node_modules/jasme/run.js",
"lint": "eslint src",

@@ -22,0 +22,0 @@ "coverage": "make coverage",

@@ -143,3 +143,6 @@ const onFinished = require('on-finished');

const metricsMiddleware = function(req, res, next) {
res.writeHead(200, {'Content-Type': 'text/plain'});
const sendSuccesss = (output) => {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(output);
};

@@ -150,7 +153,7 @@ const metricsResponse = opts.promRegistry.metrics();

metricsResponse
.then(output => res.end(output))
.then(output => sendSuccesss(output))
.catch(err => next(err));
} else {
// compatibility fallback for previous versions of prom-client@<=12
res.end(metricsResponse);
sendSuccesss(metricsResponse);
}

@@ -166,3 +169,3 @@ };

if (opts.autoregister && path.match(metricsMatch)) {
return metricsMiddleware(req, res);
return metricsMiddleware(req, res, next);
}

@@ -169,0 +172,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