This commit is contained in:
parent
cb03d5aa42
commit
5f7cdbf8d9
@ -81,14 +81,16 @@ async function logRequestToDatabase({
|
|||||||
{ upsert: true }
|
{ upsert: true }
|
||||||
).exec();
|
).exec();
|
||||||
|
|
||||||
const point = new Point("proxy");
|
const point = new Point("proxy")
|
||||||
point.tag("type", "request");
|
.tag("type", "request")
|
||||||
point.tag("node", nodeId);
|
.tag("node", nodeId)
|
||||||
point.stringField("url", url);
|
.stringField("url", url)
|
||||||
point.intField("status", status);
|
.intField("status", status)
|
||||||
|
.timestamp(Date.now());
|
||||||
if (cached) {
|
if (cached) {
|
||||||
point.tag("cached", "true");
|
point.tag("cached", "true");
|
||||||
} else {
|
}
|
||||||
|
if (time) {
|
||||||
point.intField("time", time as number);
|
point.intField("time", time as number);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user