@yolean/promparse

1.0.0 • Public • Published

promparse

This is a super primitive Prometheus text format parser, created as an example of how we can share a lib between Deno and Node.

There are other Prometheus parsers.

boilerplate

npm install --save-dev --save-exact --ignore-scripts jest typescript @tsconfig/deno ts-jest @types/jest
./node_modules/.bin/ts-jest config:init

use from Deno

#!/usr/bin/env -S deno run --allow-net
// TODO insert git ref instead of master here
import promparse from 'https://github.com/Yolean/promparse/raw/master/src/promparse.ts';
const scrape = await fetch('http://localhost:8080/metrics');
console.log(promparse(await scrape.text()));

use from Node

npm install @yolean/promparse

Readme

Keywords

none

Package Sidebar

Install

npm i @yolean/promparse

Weekly Downloads

1

Version

1.0.0

License

Apache-2.0

Unpacked Size

3.28 kB

Total Files

8

Last publish

Collaborators

  • atamon
  • solsson