diff --git a/apps/proxy/src/routes/proxy.ts b/apps/proxy/src/routes/proxy.ts index f25d9d1..4c64415 100644 --- a/apps/proxy/src/routes/proxy.ts +++ b/apps/proxy/src/routes/proxy.ts @@ -84,14 +84,12 @@ async function logRequestToDatabase({ const point = new Point("proxy") .tag("type", "request") .tag("node", nodeId) + .tag("cached", cached ? "true" : "false") .stringField("url", url) .intField("status", status) .timestamp(Date.now()); - if (cached) { - point.tag("cached", "true"); - } if (time) { - point.intField("time", time as number); + point.intField("time", time); } try { InfluxWriteApi.writePoint(point);