Interface CalculatedMetricOptions<T>

Create tracked metrics that are expensive to calculate by passing a function that is only invoked when metrics are being scraped

interface CalculatedMetricOptions<T> {
    calculate: CalculateMetric<T>;
    help?: string;
    label?: string;
}

Type Parameters

  • T = number

Hierarchy (view full)

Properties

calculate: CalculateMetric<T>

An optional function invoked to calculate the component metric instead of using .update, .increment, and .decrement

help?: string

Optional help for the metric

label?: string

Optional label for the metric