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.1.4 to 1.1.5

2

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

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

@@ -23,5 +23,2 @@ [![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)

You **MUST** call `app.use(metricsMiddleware)` before the `use`-ing your middleware,
otherwise those won't count in `http_request_seconds` histogram
```javascript

@@ -39,2 +36,10 @@ const promBundle = require("express-prom-bundle"),

**ALERT!**
The order in wich the routes are registered is important, since
**only the routes registered after the express-prom-bundle will be measured**
You can use this to your advantage to bypass some of the routes.
See the example below.
## Options

@@ -57,2 +62,7 @@

// calls to this route will not appear in metrics
// because it's applied before promBundle
app.get("/status", (req, res) => res.send("i am healthy"));
app.use(promBundle({

@@ -62,2 +72,3 @@ prefix: "demo_app:something"

// calls to this route will appear in metrics
app.get("/hello", (req, res) => res.send("ok"));

@@ -64,0 +75,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