Type alias CalculateMetric<T>

CalculateMetric<T>: (() => T) | (() => Promise<T>)

A function that returns a tracked metric which may be expensive to calculate so it is only invoked when metrics are being scraped

Type Parameters

  • T = number

Type declaration

    • (): T
    • Returns T

Type declaration