feat: replace sentry with posthog
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user