feat: Add request logging and traffic metrics for API performance monitoring

This commit is contained in:
2026-10-20 23:31:08 +03:00
parent e28d65310d
commit de72d003b8
6 changed files with 304 additions and 2 deletions

View File

@@ -73,6 +73,8 @@ export async function startApi(env = {}) {
PSU_SOURCE_ORIGIN: `http://127.0.0.1:${source.address().port}`,
PSU_DATA_DIR: data,
PSU_SOURCE_TIMEOUT_MS: "500",
// The request log would drown the test output; the metrics test turns it on.
PSU_REQUEST_LOG: "off",
...env,
});
const { app } = await import("../../server/index.js");