feat: replace sentry with posthog

This commit is contained in:
2026-04-11 15:38:10 +07:00 Unverified
parent 46d4bf0119
commit 6247f98b6a
29 changed files with 1644 additions and 702 deletions
+17
View File
@@ -0,0 +1,17 @@
import { PostHog } from "posthog-node";
let posthogClient: PostHog | null = null;
export function getPostHogClient() {
if (!posthogClient) {
posthogClient = new PostHog(
process.env.NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN!,
{
host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
flushAt: 1,
flushInterval: 0,
},
);
}
return posthogClient;
}