File tree Expand file tree Collapse file tree 2 files changed +0
-113
lines changed
Expand file tree Collapse file tree 2 files changed +0
-113
lines changed Original file line number Diff line number Diff line change 11import { PostHog } from 'posthog-node'
22
3- import { suppressConsoleOutput } from './suppress-console'
4-
53import type { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
64
75// Prints the events to console
@@ -15,16 +13,6 @@ let client: PostHog | undefined
1513
1614export let identified : boolean = false
1715
18- // Apply console wrapping when PostHog is initialized
19- function suppressPostHogConsoleErrors ( ) {
20- suppressConsoleOutput ( 'error' , ( args , errorName ) =>
21- errorName . toLowerCase ( ) . includes ( 'posthog' ) ,
22- )
23- suppressConsoleOutput ( 'warn' , ( args , errorName ) =>
24- errorName . toLowerCase ( ) . includes ( 'posthog' ) ,
25- )
26- }
27-
2816export function initAnalytics ( ) {
2917 if (
3018 ! process . env . NEXT_PUBLIC_POSTHOG_API_KEY ||
@@ -40,9 +28,6 @@ export function initAnalytics() {
4028 enableExceptionAutocapture :
4129 process . env . NEXT_PUBLIC_CB_ENVIRONMENT === 'prod' ,
4230 } )
43-
44- // Suppress PostHog console errors after initialization
45- suppressPostHogConsoleErrors ( )
4631}
4732
4833export async function flushAnalytics ( ) {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments