Skip to main content

Monitoring and Error Tracking

Here's a question every app builder should answer:

If your app crashes at 3 AM, how will you find out?

If the answer is "a user will email me," you have a problem. By the time users are emailing you, they've already had a bad experience — and some of them have already left.

Monitoring and error tracking are how you know what's happening with your app when you're not looking at it.


Why Monitoring Matters

Without MonitoringWith Monitoring
Users tell you something is brokenYou know before users notice
You guess what went wrongYou see exactly what happened
You spend hours reproducing bugsYou have the error details immediately
You don't know if your app is slowYou see performance trends
You find out about problems randomlyYou get alerted automatically

Two Types of Monitoring

1. Error Tracking

Error tracking captures detailed information when something goes wrong in your app:

  • What error occurred
  • Where in the code it happened
  • What the user was doing
  • What browser/device they were using
  • What data was involved
  • How many users were affected

Think of it as a black box recorder for your app.

2. Uptime Monitoring

Uptime monitoring checks whether your app is accessible and responding correctly:

  • Is the server reachable?
  • Does the homepage load?
  • Are API endpoints responding?
  • Is the database connected?
  • Is the SSL certificate valid?

Think of it as a smoke detector for your app.


What to Monitor

Critical: Monitor These From Day One

WhatWhyTool Example
App crashesKnow immediately when something breaksSentry
Server uptimeKnow when your app goes offlineUptime Robot
API errorsCatch backend failuresSentry
Database connectivityDetect database issues earlyServer monitoring

Important: Add These as You Grow

WhatWhyTool Example
Page load timeCatch performance issuesGoogle Analytics
User sign-upsTrack growth and spot registration issuesAnalytics
Failed loginsDetect brute force attacksCustom logging
Slow queriesFind database performance problemsDatabase monitoring
Server resourcesCPU, memory, disk usageServer monitoring

Nice to Have: For Mature Apps

WhatWhy
User behavior analyticsUnderstand how users interact with your app
Business metricsRevenue, conversion rates, churn
Custom dashboardsCombine all metrics in one view

Free Monitoring Tools to Start With

You don't need an expensive enterprise solution. These free tiers are enough for most small apps:

ToolWhat It MonitorsFree Tier
SentryError tracking5,000 events/month
Uptime RobotUptime monitoring50 monitors, 5-minute checks
Better StackUptime + status pages10 monitors, 3-minute checks
Google AnalyticsUser behavior, performanceUnlimited
LogtailLog management1GB/month
Healthchecks.ioCron job monitoring20 checks

How to Set Up Error Tracking

Step 1: Sign Up for Sentry

Go to sentry.io and create a free account. Sentry is the industry standard for error tracking and has a generous free tier.

Step 2: Install Sentry in Your App

Ask your AI tool to add Sentry to your project:

Add Sentry error tracking to my [framework] app.

Requirements:
- Install the Sentry SDK for [framework/language]
- Initialize Sentry with my DSN (stored in environment variable SENTRY_DSN)
- Capture unhandled exceptions automatically
- Set up source maps for readable stack traces
- Include user context (user ID if logged in)
- Set environment to production/staging based on NODE_ENV
- Do not send errors in development mode

Step 3: Test It

Trigger an intentional error in your app and verify it appears in Sentry's dashboard.

Step 4: Set Up Alerts

Configure Sentry to notify you when:

  • A new error type appears
  • An existing error increases in frequency
  • An error affects more than X users

How to Set Up Uptime Monitoring

Step 1: Sign Up for Uptime Robot

Go to uptimerobot.com and create a free account.

Step 2: Add Your App URL

Add a monitor for your app's URL. Set it to check every 5 minutes.

Step 3: Add Key Endpoints

Monitor more than just your homepage:

  • https://yourapp.com/ — homepage
  • https://yourapp.com/api/health — API health endpoint (if you have one)
  • https://yourapp.com/login — login page

Step 4: Set Up Notifications

Configure alerts via:

  • Email
  • SMS (paid plans)
  • Slack / Discord / Telegram webhooks

What to Do When You Get an Alert

Error Alert

  1. Don't panic. Errors happen. You have monitoring precisely so you can catch them calmly.
  2. Check Sentry for the full error details — stack trace, user context, environment.
  3. Reproduce the issue if possible. Try to understand what the user was doing.
  4. Fix the bug — use AI to help, but review the fix carefully.
  5. Deploy the fix following your deployment process.
  6. Verify the error stops appearing in Sentry.
  7. Document what happened and how it was fixed.

Uptime Alert

  1. Check if you can access the app from your browser.
  2. Check your hosting provider's status page — they may have an outage.
  3. Check server resources — CPU, memory, disk (if you have server monitoring).
  4. Restart the app if needed.
  5. Investigate the cause after restoring service.
  6. Document what happened and how to prevent it.

The Monitoring Checklist

  • Error tracking is installed (Sentry or similar)
  • Uptime monitoring is configured
  • Alerts are set up (email, Slack, etc.)
  • Someone is responsible for responding to alerts
  • Error tracking works in production (tested)
  • Source maps are uploaded for readable errors
  • User context is included in error reports
  • Performance monitoring is configured
  • Database query monitoring is set up
  • Server resource monitoring is configured
  • A response plan is documented for common alerts

The Bottom Line

You can't fix what you don't know is broken.

Monitoring and error tracking are not optional extras. They are the minimum requirement for running a professional application. Set them up before you launch, not after your first user reports a problem.

The free tiers of Sentry and Uptime Robot are enough for most small apps. There's no excuse not to have them.