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.1 to 1.2.2

10

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

@@ -23,6 +23,6 @@ "main": "src/index.js",

"devDependencies": {
"coveralls": "^2.11.12",
"eslint": "^3.11.0",
"express": "^4.13.4",
"istanbul": "^0.4.4",
"coveralls": "^2.11.15",
"eslint": "^3.11.1",
"express": "^4.14.0",
"istanbul": "^0.4.5",
"jasme": "^5.2.0",

@@ -29,0 +29,0 @@ "koa": "^1.2.4",

@@ -54,6 +54,12 @@ "use strict";

// remove default metrics provided by prom-client
// this is a really messy hack but needed for compatibility with v1
// will be completely removed in v2
if (!opts.keepDefaultMetrics) {
const metrics = promClient.register.getMetricsAsJSON();
clearInterval(promClient.defaultMetrics());
promClient.register.clear();
metrics.forEach(metric => {
if (!opts.prefix || metric.name.substr(0, opts.prefix.length) != opts.prefix) {
promClient.register.removeSingleMetric(metric.name);
}
});
}

@@ -60,0 +66,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