File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,19 @@ import { logger } from '@/util/logger'
66// This special file runs once when the Next.js server starts
77// It initializes analytics for all server-side code including API routes
88export function register ( ) {
9+ console . log ( '🔵 [instrumentation] register() called' )
10+ console . log ( '🔵 [instrumentation] NEXT_PUBLIC_CB_ENVIRONMENT:' , env . NEXT_PUBLIC_CB_ENVIRONMENT )
11+ console . log ( '🔵 [instrumentation] Has PostHog API key:' , ! ! env . NEXT_PUBLIC_POSTHOG_API_KEY )
12+ console . log ( '🔵 [instrumentation] Has PostHog host URL:' , ! ! env . NEXT_PUBLIC_POSTHOG_HOST_URL )
13+
914 try {
1015 initAnalytics ( {
1116 logger,
1217 clientEnv : env ,
1318 } )
19+ console . log ( '🟢 [instrumentation] initAnalytics() completed' )
1420 } catch ( error ) {
21+ console . error ( '🔴 [instrumentation] Failed to initialize analytics:' , error )
1522 logger . warn (
1623 { error } ,
1724 'Failed to initialize analytics - continuing without analytics' ,
You can’t perform that action at this time.
0 commit comments