chore: add telemetry for scrape robots and runs
This commit is contained in:
@@ -761,6 +761,14 @@ async function executeRun(id: string, userId: string, requestedFormats?: string[
|
||||
);
|
||||
}
|
||||
|
||||
capture("maxun-oss-run-created-api", {
|
||||
runId: plainRun.runId,
|
||||
user_id: userId,
|
||||
status: "success",
|
||||
robot_type: "scrape",
|
||||
formats
|
||||
});
|
||||
|
||||
await destroyRemoteBrowser(plainRun.browserId, userId);
|
||||
|
||||
return {
|
||||
@@ -800,6 +808,14 @@ async function executeRun(id: string, userId: string, requestedFormats?: string[
|
||||
);
|
||||
}
|
||||
|
||||
capture("maxun-oss-run-created-api", {
|
||||
runId: plainRun.runId,
|
||||
user_id: userId,
|
||||
status: "failed",
|
||||
robot_type: "scrape",
|
||||
formats
|
||||
});
|
||||
|
||||
await destroyRemoteBrowser(plainRun.browserId, userId);
|
||||
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user