improv: telemetry

This commit is contained in:
tomasz-io 2024-10-18 16:39:26 +07:00
parent d213b395c9
commit 2f2544e962
2 changed files with 15 additions and 1 deletions

View file

@ -1,4 +1,5 @@
import { SerializedContinueConfig } from "../";
import { Telemetry } from "../util/posthog";
export interface ConfigValidationError {
fatal: boolean;
@ -116,5 +117,17 @@ export function validateConfig(config: SerializedContinueConfig) {
}
});
return errors.length > 0 ? errors : undefined;
if (errors.length > 0) {
void Telemetry.capture(
"configValidationError",
{
errors,
},
true,
);
return errors;
}
return undefined;
}

View file

@ -22,6 +22,7 @@ export default function PostHogPageView() {
posthog.capture("$pageview", {
$current_url: url,
pathname,
});
}
}, [pathname, searchParams, posthog]);