feat: emit ingest and scan telemetry

This commit is contained in:
Andrey Avtomonov 2026-05-22 15:57:55 +02:00
parent 1b7c9fcdba
commit 31efe1011d
5 changed files with 162 additions and 3 deletions

View file

@ -101,7 +101,12 @@ export async function emitProjectStackSnapshot(input: {
}
emittedProjectSnapshots.add(input.projectDir);
const project = await loadKtxProject({ projectDir: input.projectDir });
let project: Awaited<ReturnType<typeof loadKtxProject>>;
try {
project = await loadKtxProject({ projectDir: input.projectDir });
} catch {
return;
}
await emitTelemetryEvent({
name: 'project_stack_snapshot',
fields: await buildProjectStackSnapshotFields(project),