What to log and monitor in a small SaaS from day one

The minimum monitoring for a small SaaS: error tracking, structured logs, uptime checks, job heartbeats and payment alerts. What to log and what never to.

By Sohail Hussain21 November 20266 min read

From the first day a small SaaS has users, monitor five things: errors in the server and browser, sent to an error tracker that alerts you; structured logs for every request and important event, tagged with user and account; uptime checks from outside your hosting; heartbeats for scheduled jobs and webhooks; and a handful of business signals such as failed payments and a day with no sign-ups. Never log passwords, tokens, API keys, card numbers or more personal data than you need. That covers most of what goes wrong, and most of it can be set up in a day on free or cheap tiers.

The goal is simple: when something breaks for a paying customer, you know before they email you, and you can see what happened.

What is the minimum monitoring a small SaaS needs?

SignalWhat it catchesTypical toolAlert
ErrorsExceptions on the server and in the browserError tracker such as SentryNew issue, or a spike
UptimeSite or API down, expired SSL, DNS problemsExternal uptime monitorImmediately
Structured logsWhat happened in each request and jobHost logs or a log serviceNo; searched when needed
Job heartbeatsScheduled jobs that fail or silently stopHeartbeat check in the uptime toolWhen a run is missed
WebhooksPayment and integration events not processedLogs, error tracker, provider dashboardOn failures
Business signalsFailed payments, sign-ups stopped, usage dropYour database, a daily summaryDaily, and on zero
DatabaseSlow queries, storage, connectionsHost or provider metricsAt thresholds
BackupsBackups missing or not restorableProvider alerts, a monthly restore testOn failure

Setting this up is part of the hosting and monitoring work in every web app and SaaS development project we deliver, before launch rather than after the first incident.

How do you catch errors before customers report them?

Install an error tracker in both the server and the browser. It groups repeated errors into issues, records the stack trace, the request, the browser and the release, and alerts you when a new issue appears. Most offer a free tier. As of October 2026, Sentry's pricing page lists a free Developer plan for one user with a quota of 5,000 errors, and a Team plan from $29 a month on monthly billing.

In Next.js, server errors from pages, route handlers and server actions can be captured in one place with the onRequestError hook in instrumentation.ts, described in the Next.js instrumentation docs. Error tracking SDKs plug into this hook, and you can also use it directly to write a structured error log:

ts
// instrumentation.ts
import { type Instrumentation } from "next";

export const onRequestError: Instrumentation.onRequestError = async (err, request, context) => {
  const message = err instanceof Error ? err.message : String(err);
  const digest =
    typeof err === "object" && err !== null && "digest" in err ? String(err.digest) : undefined;

  console.error(
    JSON.stringify({
      level: "error",
      event: "request_error",
      message,
      digest,
      method: request.method,
      path: request.path,
      route: context.routePath,
      routeType: context.routeType,
    })
  );
};

Two habits make error tracking useful rather than noisy. Tag each release, so you can see which deploy introduced an issue. And resolve or ignore every issue deliberately, so a new one stands out. An inbox of five hundred unresolved errors alerts nobody.

What should you log, and what should you never log?

Log in a structured format, one JSON object per line, so you can search and filter by field. Each line should carry the same core fields:

json
{"level":"info","event":"invoice_sent","requestId":"req_8f3a2c","tenantId":"t_42","userId":"u_17","durationMs":184}

Always include: a timestamp (most hosts add it), the level, an event name, a request ID that follows the request through every log line, and the account and user IDs. In a multi-customer product the account ID is what lets you see one customer's problem without wading through everyone else's; multi-tenant SaaS architecture covers why every part of the system should carry it.

Log these events: sign-ups, sign-ins and failed sign-ins, permission denials, payments and failed payments, plan changes, webhook receipts and their outcome, background job starts and finishes, calls to external APIs with their status and duration, and every admin action.

Never log: passwords, session cookies, API keys, access and refresh tokens, full card numbers, one-time codes, or whole request bodies that may contain any of these. Keep personal data to what you need to investigate a problem; an ID is usually enough, not a name, email and address. Privacy laws such as the GDPR and India's Digital Personal Data Protection Act apply to logs as much as to databases, so check retention and content with a lawyer.

Missing or poor logging is a security problem as well as an operational one. Security logging and alerting failures are on the OWASP Top 10, because attacks that are not logged cannot be investigated.

How do you know the app is up?

Check it from outside. Your host's own status page tells you about the host, not about your app, your DNS or your certificate. An external uptime monitor requests a few URLs every minute or few minutes, from more than one region, and alerts you when they fail.

Monitor three kinds of URL:

  1. The marketing site's home page, the first thing a prospect sees.
  2. A health endpoint in the app that checks the database connection and returns a 200 only if the app can actually serve requests.
  3. A key API route or the sign-in page, which fails in ways the home page does not.

Most uptime tools also warn before SSL certificates and domains expire, which is one of the most common and most avoidable outages. Uptime monitoring covers tools and setup in more detail.

How do you watch jobs, webhooks and payments?

These fail silently. Nobody sees a page error when a nightly job stops running or a webhook handler starts rejecting events.

Heartbeats for scheduled jobs. At the end of each successful run, the job pings a heartbeat URL in your monitoring tool. If the ping does not arrive on schedule, you get an alert. Our cron expression generator helps you write and check the schedule so the expected interval matches the real one.

Webhook outcomes. Log every webhook received, its type and whether it was processed. Alert on signature failures and processing errors. Payment providers show failed deliveries in their dashboards too; check them weekly. For Stripe, how to add subscriptions with Stripe explains which events decide who has access, which makes them the ones to watch.

Business signals. A short daily summary, by email or chat, of sign-ups, new paying customers, failed payments and cancellations. Add an alert for zero: a day with no sign-ups after weeks of steady ones usually means the sign-up form is broken, not that demand stopped.

Who gets alerted, and how do you avoid noise?

Send alerts to one place the team actually watches, such as a dedicated chat channel, plus a phone notification for the few that need a person within minutes: the app is down, payments are failing, errors are spiking.

Alert on symptoms customers feel, not on every cause. "Sign-in page returns errors" deserves a call at night. "CPU at 80 percent for five minutes" usually does not. Each alert should say what is wrong and link to where to look.

Review alerts monthly. Any alert that fired and needed no action should be tuned or removed, or the team learns to ignore all of them. For a team of two, agree who is on call each week, even informally, so an alert at 2 a.m. has an owner.

If you have inherited a product with none of this in place, add error tracking and uptime checks before changing anything else; taking over an existing codebase lists them among the first fixes. The pillar guide on how to build a SaaS product shows where monitoring fits among the early decisions that are hard to change later.

Was this guide useful?

Questions

Frequently asked.

How much does monitoring cost for a small SaaS?

Often nothing at first. As of October 2026, error tracking, uptime checks and log search all have free tiers that cover a product with its first few hundred users. Expect to pay something like US$30 to 150 a month once you have paying customers and want longer log retention, more users on the error tracker and faster uptime checks.

Do I need a full observability platform?

Not at the start. Tracing across services, custom dashboards and metrics pipelines solve problems of larger systems with several services and teams. A single app with a database needs error tracking, searchable logs, uptime checks and a few business alerts. Add tracing when one request crosses several services and you cannot tell where time goes.

How long should I keep logs?

Long enough to investigate a problem a customer reports late, often 14 to 30 days for application logs. Keep audit logs of admin and security events much longer, often a year or more. Keep personal data in logs to a minimum, and check retention against the privacy laws that apply to you with a lawyer.

Sohail Hussain

Founder, MSH Technologies

Sohail has designed and built websites, web apps and AI products for over 12 years, for clients from Singapore-based industrial groups to early-stage SaaS startups. He writes about what actually worked.

Keep reading

Related guides.

All posts

Your next move

Like what you see? Tell us about it.

A process that takes too long, a website that undersells you, or an idea ready to take shape. Tell us where you are and we will suggest a useful next step.

India · Working with clients worldwide

Sohail, Founder, replies within 1 working day (Mon–Sat, IST). Free and no obligation.