chore: add telemetry for scrape robots and runs

This commit is contained in:
Rohit Rajan
2025-11-20 19:40:48 +05:30
parent 6477feeaea
commit b2b5a914e7
4 changed files with 51 additions and 3 deletions

View File

@@ -321,6 +321,14 @@ async function executeRun(id: string, userId: string) {
);
}
capture("maxun-oss-run-created-scheduled", {
runId: plainRun.runId,
user_id: userId,
status: "success",
robot_type: "scrape",
formats
});
await destroyRemoteBrowser(plainRun.browserId, userId);
return true;
@@ -352,6 +360,14 @@ async function executeRun(id: string, userId: string) {
);
}
capture("maxun-oss-run-created-scheduled", {
runId: plainRun.runId,
user_id: userId,
status: "failed",
robot_type: "scrape",
formats
});
await destroyRemoteBrowser(plainRun.browserId, userId);
throw error;