0.1.0 • Published 1 year ago

@egomobile/http-prometheus v0.1.0

Weekly downloads
-
License
LGPL-3.0
Repository
github
Last release
1 year ago

npm PRs Welcome

@egomobile/http-prometheus

Sets up prom-clients for @egomobile/http-server instances.

Table of contents

Install

Execute the following command from your project folder, where your package.json file is stored:

npm install --save @egomobile/http-prometheus

Usage

Quick example

import createServer from "@egomobile/http-server";
import { setupPromClient } from "@egomobile/http-prometheus";

const app = createServer();

// this registers a new GET endpoint
// for path `/prometheus`, which uses
// a new `Registry` instance of `prom-client`
setupPromClient(server, "/prometheus");

// ...

await app.listen();

Credits

The module makes use of:

Documentation

The API documentation can be found here.