JSPM

fastify-prom-client

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q29652F
  • License BSD-3-Clause

instrument a fastify application for consumption by prometheus

Package Exports

  • fastify-prom-client

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fastify-prom-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.