Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(index/metrics): timings for unhappy path

Gergő Móriczf176660b8742
diff --git a/apps/api/src/scraper/scrapeURL/engines/index/index.ts b/apps/api/src/scraper/scrapeURL/engines/index/index.ts
index 4a2b79da5..c1e22fda7 100644
--- a/apps/api/src/scraper/scrapeURL/engines/index/index.ts
+++ b/apps/api/src/scraper/scrapeURL/engines/index/index.ts
@@ -290,6 +290,9 @@ export async function scrapeURLWithIndex(
hit: false,
maxAge,
dynamicMaxAge: meta.options.maxAge === undefined,
+ timingsFull: Date.now() - startTime,
+ timingsMaxAge: checkpoint1 - startTime,
+ timingsSupa: Date.now() - checkpoint1,
});
throw new IndexMissError();
}