NestJS Prometheus 安装 yarn add @willsoto/nestjs-prometheus prom-client npm install @willsoto/nestjs-prometheus prom-client 用法 import { Module } from "@nestjs/common" ; import { PrometheusModule } from "@willsoto/nestjs-prometheus" ; @ Module ( { imports : [ PrometheusModule . register ( ) ] , } ) export class AppModule { } 默认情况下,这将注册/metrics端点,该端点将返回。 更改指标http端点 import { Module } from "@nestjs/c