@biorate/prometheus
TypeScript icon, indicating that this package has built-in type declarations

1.65.4 • Public • Published

Prometheus

Allows you to create prometheus metrics easily using dependency injection mechanism

Example:

import { counter, Counter } from '@biorate/prometheus';

class Test {
  @counter({
    name: 'test_counter',
    help: 'Test counter',
    labelNames: ['label1', 'label2'],
  })
  protected counter: Counter;

  public metric() {
    this.counter.labels({ label1: 1, label2: 2 }).inc();
  }
}

const test = new Test();

test.metric();

Learn

  • Documentation can be found here - docs.

Release History

See the CHANGELOG

License

MIT

Copyright (c) 2021-present Leonid Levkin (llevkin)

/@biorate/prometheus/

    Package Sidebar

    Install

    npm i @biorate/prometheus

    Weekly Downloads

    5

    Version

    1.65.4

    License

    MIT

    Unpacked Size

    186 kB

    Total Files

    34

    Last publish

    Collaborators

    • llevkin