Source:
ocean/docs/production-monitoring-setup.md| ✏️ Edit on GitHub
Production Monitoring Setup
This guide explains how to properly configure Sentry and PostHog for production.
Current Issues
- Sentry 403 Forbidden: The domain
ocean.goldfish.iois not in the allowed domains list - PostHog 401 Unauthorized: Missing or invalid API key in production environment
Sentry Configuration
1. Add Domain to Allowed Domains
- Log in to Sentry
- Go to Settings → Projects → Select your project
- Navigate to Security & Privacy → Allowed Domains
- Add these domains:
ocean.goldfish.io*.goldfish.io(if you want to allow all subdomains)localhost:*(for local development)
- Save changes
2. Verify DSN Configuration
Your current DSN appears to be: https://[YOUR_SENTRY_DSN]@sentry.io/[PROJECT_ID]
Ensure this is set in your production environment:
VITE_SENTRY_DSN=https://[YOUR_SENTRY_DSN]@sentry.io/[PROJECT_ID]
PostHog Configuration
1. Get Your PostHog API Key
- Log in to PostHog
- Go to Project Settings → API Keys
- Copy the Project API Key (starts with
phc_)
2. Set Environment Variables
Add these to your production environment (Vercel/Railway/etc):
VITE_POSTHOG_API_KEY=phc_your_actual_key_here
VITE_POSTHOG_HOST=https://us.posthog.com
VITE_POSTHOG_PROJECT_ID=your_project_id
Vercel Configuration (if applicable)
- Go to your Vercel project dashboard
- Navigate to Settings → Environment Variables
- Add the following variables for Production:
VITE_SENTRY_DSNVITE_POSTHOG_API_KEYVITE_POSTHOG_HOSTVITE_POSTHOG_PROJECT_ID
- Redeploy your application
Testing
After configuration:
- Clear your browser cache
- Visit https://ocean.goldfish.io
- Open browser console
- Verify no 403/401 errors appear
- Test an action that would trigger analytics
Optional: Disable Monitoring for Development
If you don't want monitoring in development, simply don't set these environment variables locally. The application will run without Sentry or PostHog.