• Express middleware that returns the metrics collected by the registry.

    Parameters

    • registry: Registry

      The metrics registry.

    • shouldCollectDefaultMetrics: boolean = true

      Indicates whether to collect default metrics. Default is true.

    • OptionaldefaultMetricsPrefix: string

      The prefix to be added to default metrics.

    • OptionaldefaultMetricsLabels: Record<string, string>

      The labels to be added to default metrics.

    Returns express.RequestHandler

    The Express request handler function.