mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add metrics
This commit is contained in:
parent
21799b7b6d
commit
4571f1f51c
1 changed files with 4 additions and 0 deletions
|
|
@ -134,6 +134,7 @@ const getBrowserPromise = (async () => {
|
|||
executablePath: process.env.CHROMIUM_PATH || (await chromium.executablePath),
|
||||
headless: process.env.LAUNCH_HEADLESS ? true : chromium.headless,
|
||||
timeout: 0,
|
||||
userDataDir: '/tmp/puppeteer',
|
||||
});
|
||||
})();
|
||||
|
||||
|
|
@ -363,6 +364,8 @@ exports.puppeteer = Sentry.GCPFunction.wrapHttpFunction(async (req, res) => {
|
|||
console.log(content);
|
||||
}
|
||||
|
||||
logRecord.timing.contentFetchTime = Date.now() - functionStartTime;
|
||||
|
||||
const apiResponse = await sendCreateArticleMutation(userId, {
|
||||
url: finalUrl,
|
||||
articleSavingRequestId,
|
||||
|
|
@ -376,6 +379,7 @@ exports.puppeteer = Sentry.GCPFunction.wrapHttpFunction(async (req, res) => {
|
|||
skipParsing: !content,
|
||||
});
|
||||
|
||||
logRecord.timing.totalTime = Date.now() - functionStartTime;
|
||||
logRecord.result = apiResponse.createArticle;
|
||||
logger.info(`parse-page`, logRecord);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue