chore: add telemetry for scrape robots and runs
This commit is contained in:
@@ -268,6 +268,14 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
|
||||
logger.log('warn', `Failed to send webhooks for markdown robot run ${data.runId}: ${webhookError.message}`);
|
||||
}
|
||||
|
||||
capture("maxun-oss-run-created-manual", {
|
||||
runId: data.runId,
|
||||
user_id: data.userId,
|
||||
status: "success",
|
||||
robot_type: "scrape",
|
||||
formats,
|
||||
});
|
||||
|
||||
await destroyRemoteBrowser(browserId, data.userId);
|
||||
|
||||
return { success: true };
|
||||
@@ -296,6 +304,14 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
|
||||
logger.log('warn', `Failed to send run-failed notification for markdown robot run ${data.runId}: ${socketError.message}`);
|
||||
}
|
||||
|
||||
capture("maxun-oss-run-created-manual", {
|
||||
runId: data.runId,
|
||||
user_id: data.userId,
|
||||
status: "failed",
|
||||
robot_type: "scrape",
|
||||
formats,
|
||||
});
|
||||
|
||||
await destroyRemoteBrowser(browserId, data.userId);
|
||||
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user