New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

koa-prometheus-middleware

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

koa-prometheus-middleware

Koa prometheus middleware

unpublished
latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

📟 koa-prometheus-middleware

This is a middleware for koa servers, that expose metrics for prometheus.

💻 Installation

Version 16.6.0 or newer of Node.js is required

npm install koa-prometheus-middleware

yarn add koa-prometheus-middleware

Example

// add global middleware
app.use(
  PrometheusMiddleware({
    ignorePaths: ["/metrics"],
  })
);

// add router
router.get("/metrics", async (ctx) => {
  ctx.set("Content-Type", Prometheus.register.contentType);
  return ctx.res.end(await Prometheus.register.metrics());
});

📜 Credits

  • express-prometheus-middleware

💖 Thank you

You can support koa-prometheus-middleware by giving it a GitHub star.

Keywords

koa

FAQs

Package last updated on 18 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts