libp2p
    Preparing search index...

    Interface PrometheusCalculatedSummaryOptions<T>

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

    interface PrometheusCalculatedSummaryOptions<T = number> {
        ageBuckets?: number;
        calculate: CalculateMetric<T>;
        compressCount?: number;
        help?: string;
        label?: string;
        maxAgeSeconds?: number;
        percentiles?: number[];
        pruneAgedBuckets?: boolean;
        registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">;
    }

    Type Parameters

    • T = number

    Hierarchy (View Summary)

    Index

    Properties

    ageBuckets?: number

    Configure how many buckets in the sliding window

    calculate: CalculateMetric<T>

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

    compressCount?: number

    Control compression of data in t-digest

    help?: string

    Optional help for the metric

    label?: string

    Optional label for the metric

    maxAgeSeconds?: number

    Configure how old a bucket can be before it is reset for sliding window

    percentiles?: number[]

    Percentiles for the summary

    pruneAgedBuckets?: boolean

    Remove entries without any new values in the last maxAgeSeconds

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