1.0.1 • Published 7 years ago

bridge-metrics v1.0.1

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

codecov

bridge-metrics

Bridge metrics lib

You can use Prometheus metrics like this:

'use strict';

const prometheusMetrics = require('bridge-metrics').prometheusMetrics;

// This will get the content-type for prometheus
cont contentType = prometheusMetrics.getContentType();

// You will get all the prometheus metrics
cont allMetrics = prometheusMetrics.getAllMetrics();

With express you can use it like this:

metrics: (req, res) => {
    res.set('Content-Type', contentType);
    res.end(allMetrics);
}