Documentation
    Preparing search index...

    Options for configuring metrics middleware.

    interface Opts {
        collectNodeMetrics: boolean;
        collectServiceVersion: boolean;
        customLabels: { [key: string]: any };
        includeOperationId: boolean;
        labels: Record<string, string>;
        registry: Registry;
        transformLabels?: TransformLabelsFn;
    }
    Index

    Properties

    collectNodeMetrics: boolean

    Whether to collect node metrics.

    collectServiceVersion: boolean

    Whether to collect service version metrics.

    customLabels: { [key: string]: any }

    Object containing extra labels, useful together with transformLabels.

    includeOperationId: boolean

    Add operation id based on the Openapi operationId to the metrics. Requires the express-openapi-validator package to function.

    labels: Record<string, string>

    The labels to attach to all the metrics.

    registry: Registry

    The Prometheus registry to use for the metrics.

    transformLabels?: TransformLabelsFn

    Function to transform labels with request and response objects.