fastify-prom-client

0.1.0 • Public • Published

fastify-prom-client

instrument a fastify application for consumption by prometheus

Installation

npm install --save fastify-prom-client

Usage

// use default options
fastify.register(require('fastify-prom-client'))
 
// or if you wanted to customise the metric
const prometheus = require('prom-client')
 
fastify.register(require('fastify-prom-client'), {
  metric: new prometheus.Histogram({
    name: 'http_request_buckets_milliseconds',
    help: 'request duration buckets in milliseconds'
  })
})

See example.js for a full example.

License

Released under the 3-Clause BSD License. See LICENSE for more information.

Readme

Keywords

Package Sidebar

Install

npm i fastify-prom-client

Weekly Downloads

1

Version

0.1.0

License

BSD-3-Clause

Unpacked Size

4.03 kB

Total Files

6

Last publish

Collaborators

  • excitableaardvark