我有一个具有如下 URL 的 Node JS 应用程序:
/app/:vehicleNumber/details
它在 URL 中动态获取车辆编号。
用于 HTTP 调用的基于 prom-client 的指标 API 将所有 URL 作为单独的 URL 返回,而不是将它们作为单个 URL 并以 vehicleNumber 作为变量。
http_request_duration_seconds_bucket{le="0.003",status_code="200",method="GET",path="/app/GJ98T0006/details"}
http_request_duration_seconds_bucket{le="0.003",status_code="200",method="GET",path="/app/KA28T6511/details"}
.....
我想要基于单个 URL 的计数。例如
http_request_duration_seconds_bucket{le="0.003",status_code="200",method="GET",path="/app/{var}/details"}
当 UUID 存在于 URL 中但不存在于 URL 中的车辆编号时,就会发生这种情况。