add cache status to all requests
All checks were successful
Publish Docker Images / docker (push) Successful in 1m22s

This commit is contained in:
Lee 2023-11-17 09:31:06 +00:00
parent bde1fc4572
commit 74f5832a8a

@ -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);