4.0.2 • Published 5 years ago

hemera-prometheus v4.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Hemera-prometheus

Prometheus collector for Hemera

npm styled with prettier

This client will expose a public metric endpoint on localhost:3000/metrics. You can expose more Counter, Gauge as http endpoint with one command hemera.exposeMetric('metricName'). For more informations about the prometheus client look in the driver documentation.

Usage

const hemera = new Hemera(nats)
hemera.use(require('hemera-prometheus'))
hemera.ready(() => {
  const c = new hemera.prom.Counter({
    name: 'test_counter',
    help: 'Example of a counter',
    labelNames: ['code']
  })

  hemera.exposeMetric('test_counter') // localhost:3000/metrics/test_counter

  c.inc()

  setInterval(() => c.inc(), 10000)
})

Plugin decorators

  • .prom
  • .express
4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.2

7 years ago

0.0.1

7 years ago