BSB Node.js Type Definitions
    Preparing search index...

    Interface Gauge<LABELS>

    interface Gauge<LABELS extends string | undefined = undefined> {
        set(
            value: number,
            labels?: LABELS extends string
                ? Partial<Record<LABELS<LABELS>, string>>
                : never,
        ): void;
        increment(
            value?: number,
            labels?: LABELS extends string
                ? Partial<Record<LABELS<LABELS>, string>>
                : never,
        ): void;
        decrement(
            value?: number,
            labels?: LABELS extends string
                ? Partial<Record<LABELS<LABELS>, string>>
                : never,
        ): void;
    }

    Type Parameters

    • LABELS extends string | undefined = undefined
    Index

    Methods

    • Sets the value of the gauge metric.

      Parameters

      • value: number

        The value to set the gauge metric

      • Optionallabels: LABELS extends string ? Partial<Record<LABELS<LABELS>, string>> : never

        Optional labels to associate with the gauge metric

      Returns void

    • Increments the value of the gauge metric by a specified amount.

      Parameters

      • Optionalvalue: number

        The amount to increment the gauge metric by

      • Optionallabels: LABELS extends string ? Partial<Record<LABELS<LABELS>, string>> : never

        Optional labels to associate with the gauge metric

      Returns void

    • Decrements the value of the gauge metric by a specified amount.

      Parameters

      • Optionalvalue: number

        The amount to decrement the gauge metric by

      • Optionallabels: LABELS extends string ? Partial<Record<LABELS<LABELS>, string>> : never

        Optional labels to associate with the gauge metric

      Returns void