Enhanced PostHog Error Tracking with Detailed Messages (#6176)

This commit is contained in:
Zane
2025-12-18 13:40:31 -08:00
committed by GitHub
parent 7ff3adcc5f
commit 70ac4b4322
8 changed files with 61 additions and 10 deletions
+11 -1
View File
@@ -43,7 +43,7 @@ import { NoProviderOrModelError, useAgent } from './hooks/useAgent';
import { useNavigation } from './hooks/useNavigation';
import { errorMessage } from './utils/conversionUtils';
import { usePageViewTracking } from './hooks/useAnalytics';
import { trackOnboardingCompleted } from './utils/analytics';
import { trackOnboardingCompleted, trackErrorWithContext } from './utils/analytics';
function PageViewTracker() {
usePageViewTracking();
@@ -129,6 +129,11 @@ const PairRouteWrapper = ({
setActiveSessionId(newSession.id);
} catch (error) {
console.error('[PairRouteWrapper] Failed to create session:', error);
trackErrorWithContext(error, {
component: 'PairRouteWrapper',
action: 'create_session',
recoverable: true,
});
} finally {
setIsCreatingSession(false);
}
@@ -428,6 +433,11 @@ export function AppInner() {
});
} catch (error) {
console.error('Unexpected error opening shared session:', error);
trackErrorWithContext(error, {
component: 'AppInner',
action: 'open_shared_session',
recoverable: true,
});
// Navigate to shared session view with error
const shareToken = link.replace('goose://sessions/', '');
const options = {