A group of related metrics loosely based on the interfaces exposed by the prom-client module

Hierarchy

  • MetricGroup

Properties

decrement: ((values: Record<string, unknown>) => void)

Type declaration

    • (values: Record<string, unknown>): void
    • Decrement the metric group keys by the passed number or any non-numeric value to decrement by 1

      Parameters

      • values: Record<string, unknown>

      Returns void

increment: ((values: Record<string, unknown>) => void)

Type declaration

    • (values: Record<string, unknown>): void
    • Increment the metric group keys by the passed number or any non-numeric value to increment by 1

      Parameters

      • values: Record<string, unknown>

      Returns void

reset: (() => void)

Type declaration

    • (): void
    • Reset the passed key in this metric group to its default value or all keys if no key is passed

      Returns void

timer: ((key: string) => StopTimer)

Type declaration

    • (key: string): StopTimer
    • Start a timed metric for the named key in the group, call the returned function to stop the timer

      Parameters

      • key: string

      Returns StopTimer

update: ((values: Record<string, number>) => void)

Type declaration

    • (values: Record<string, number>): void
    • Update the stored metric group to the passed value

      Parameters

      • values: Record<string, number>

      Returns void