improv: telemetry
This commit is contained in:
parent
d213b395c9
commit
2f2544e962
2 changed files with 15 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export default function PostHogPageView() {
|
|||
|
||||
posthog.capture("$pageview", {
|
||||
$current_url: url,
|
||||
pathname,
|
||||
});
|
||||
}
|
||||
}, [pathname, searchParams, posthog]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue