libp2p
    Preparing search index...

    Interface PrometheusCalculatedHistogramOptions<T>

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

    interface PrometheusCalculatedHistogramOptions<T = number> {
        buckets?: number[];
        calculate: CalculateMetric<T>;
        help?: string;
        label?: string;
        registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">;
    }

    Type Parameters

    • T = number

    Hierarchy (View Summary)

    Index

    Properties

    buckets?: number[]

    Buckets for the histogram

    calculate: CalculateMetric<T>

    An optional function invoked to calculate the component metric instead of using .observe

    help?: string

    Optional help for the metric

    label?: string

    Optional label for the metric

    registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">