Shipnative includes comprehensive monitoring with PostHog for analytics and Sentry for error tracking. All utilities are pre-built and ready to use.
The wizard prompts for your PostHog API key and host URL.
Or manually add to apps/app/.env:
Without keys: Mock mode logs events to console. Connect real PostHog early to capture usage data.
useAnalytics Hook
Utility Functions
For use outside React components:
Direct Client Access
Feature Flags
Create flags in PostHog Dashboard β Feature Flags. See PostHog Feature Flags .
Pre-built Event Helpers
Testing
Mock mode: Events logged to console as [MockPostHog] Event: ...
Real PostHog:
Add API key and host to .env
Trigger events in app
View in PostHog Dashboard β Events / Persons
Troubleshooting
Events not showing in PostHog?
Verify API key and host are correct
Allow a few minutes for events to process
Check console for PostHog errors
Still in mock mode?
Verify apps/app/.env has correct keys
Restart Metro: yarn start --clear
For more, see PostHog React Native SDK .
Error Tracking with Sentry
Sentry automatically captures JavaScript errors, native crashes, and performance issues. Itβs configured to work seamlessly with your app.
Run the setup wizard:
The wizard will prompt for your Sentry DSN. Or manually add to apps/app/.env:
Without DSN: Mock mode logs errors to console. Connect real Sentry early to catch production issues.
Automatic Error Capture
Sentry automatically captures:
JavaScript errors - Unhandled exceptions and promise rejections
Native crashes - iOS and Android native errors
React errors - Component render errors via Error Boundaries
Performance issues - Slow screens and network requests
No additional code needed - errors are automatically reported.
Manual Error Reporting
Capture errors manually with context:
Breadcrumbs
Add breadcrumbs for debugging context:
User Context
Associate errors with users:
Track custom operations:
Utility Functions
Pre-built helpers in utils/crashReporting.ts:
Testing Sentry
Trigger a test error:
View errors in Sentry Dashboard β Issues.
Filtering Errors
Configure what gets reported in services/sentry.ts:
Production Best Practices
Environment tagging - Automatically set via EXPO_PUBLIC_ENV
Release tracking - Set release version for tracking issues across versions
Source maps - Uploaded automatically for readable stack traces
User privacy - Avoid sending PII (personally identifiable information)
For more, see Sentry React Native SDK .