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?
| Signal | What it catches | Typical tool | Alert |
|---|---|---|---|
| Errors | Exceptions on the server and in the browser | Error tracker such as Sentry | New issue, or a spike |
| Uptime | Site or API down, expired SSL, DNS problems | External uptime monitor | Immediately |
| Structured logs | What happened in each request and job | Host logs or a log service | No; searched when needed |
| Job heartbeats | Scheduled jobs that fail or silently stop | Heartbeat check in the uptime tool | When a run is missed |
| Webhooks | Payment and integration events not processed | Logs, error tracker, provider dashboard | On failures |
| Business signals | Failed payments, sign-ups stopped, usage drop | Your database, a daily summary | Daily, and on zero |
| Database | Slow queries, storage, connections | Host or provider metrics | At thresholds |
| Backups | Backups missing or not restorable | Provider alerts, a monthly restore test | On 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:
// 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:
{"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:
- The marketing site's home page, the first thing a prospect sees.
- A health endpoint in the app that checks the database connection and returns a 200 only if the app can actually serve requests.
- 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?