# bridge-node-metrics

> Bridge metrics for prometheus

Latest version **1.2.3** (published 2018-03-20) · MIT License license · 0 weekly downloads

## Install

```sh
npm install bridge-node-metrics
pnpm add bridge-node-metrics
yarn add bridge-node-metrics
bun add bridge-node-metrics
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2018-03-20 |
| First published | 2018-03-07 |
| Weekly downloads | 0 |
| License | MIT License |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jimmy Grand |
| Maintainers | leadformance |
| Keywords | common, metrics, prometheus |

## Links

- npm: https://www.npmjs.com/package/bridge-node-metrics
- Repository: https://github.com/Leadformance/bridge-node-metrics
- Homepage: https://github.com/Leadformance/bridge-node-metrics#README.md
- Issues: https://github.com/Leadformance/bridge-node-metrics/issues
- npm.io page: https://npm.io/package/bridge-node-metrics

## Dependencies (2)

- [prom-client](https://npm.io/package/prom-client.md) ^10.0.2
- [bridge-node-http-server](https://npm.io/package/bridge-node-http-server.md) ^1.0.3

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.2.3 (latest) — 2018-03-20
- 1.2.2 — 2018-03-19
- 1.2.1 — 2018-03-12
- 1.2.0 — 2018-03-09
- 1.1.0 — 2018-03-07
- 1.0.1 — 2018-03-07

## README

[![codecov](https://codecov.io/gh/Leadformance/bridge-node-metrics/branch/master/graph/badge.svg)](https://codecov.io/gh/Leadformance/bridge-node-metrics)

# 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);
}
```

---
_Source: https://npm.io/package/bridge-node-metrics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
