Function histogram

  • Parameters

    Returns ((proto, key) => void)

      • (proto, key): void
      • Parameters

        • proto: any
        • key: string

        Returns void

    Example

    import { histogram, Histogram } from '@biorate/prometheus';

    class Test {
    @histogram({
    name: 'test_histogram',
    help: 'Test histogram',
    labelNames: ['label1', 'label2'],
    })
    protected histogram: Histogram;

    public metric() {
    this.histogram.labels({ label1: 1, label2: 2 }).observe(10);
    }
    }

    const test = new Test();

    test.metric();

Generated using TypeDoc