MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / flushAnalytics

Function flushAnalytics

cli/src/utils/analytics.ts:166–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164}
165
166export async function flushAnalytics() {
167 if (!client) {
168 return
169 }
170 try {
171 await client.flush()
172 } catch (error) {
173 // Silently handle PostHog network errors - don't log to console or logger
174 // This prevents PostHog errors from cluttering the user's console
175 logAnalyticsError(error, { stage: AnalyticsErrorStage.Flush })
176 }
177}
178
179export function trackEvent(
180 event: AnalyticsEvent,

Callers 3

logAsErrorIfNeededFunction · 0.90
exitFreebuffCleanlyFunction · 0.90
exitCliFunction · 0.90

Calls 2

logAnalyticsErrorFunction · 0.85
flushMethod · 0.45

Tested by

no test coverage detected