connect-prometheus
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

A connect middleware for prometheus

Features

  • Support cluster
  • Support multiple clusters via broadcast-channel
  • Aggregate metrics automatically

Usage

import Prometheus from 'connect-prometheus'
import Express from 'express'

const app = Express()
app.use(Prometheus())

app.get('/metrics', (req, res, next) => {
  req
    .getMetrics()
    .then(metrics => res.send(metrics))
    .catch(next)
})

/connect-prometheus/

    Package Sidebar

    Install

    npm i connect-prometheus

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    18.6 kB

    Total Files

    6

    Last publish

    Collaborators

    • tangye