Logging and Observability for Small Apps
By Mykhailo Boichuk · Co-founder & Vice-President
In short
Small apps still need to answer what happened when something goes wrong, which is what observability provides. The goal is structured, queryable logs at meaningful events rather than a flood of debug lines, a way to correlate the events of a single request or session, and strict discipline about never logging personal data. Useful observability is about asking questions later, not recording everything now.
Observability is asking questions later
Observability is the property of being able to answer questions about what a system did after the fact, without having anticipated the exact question in advance. For a small app this matters because problems show up in production that no test reproduced, and the only way to understand them is the trail the system left behind. Without that trail, debugging a live issue becomes guesswork.
The mistake is to equate this with logging everything. A flood of undifferentiated log lines is nearly as useless as no logs, because the relevant signal is buried. Good observability records meaningful events in a form you can query, so that when a question arises you can interrogate the data rather than scroll through it.
Structure and correlation
Logs are far more useful when they are structured rather than free-form prose, because structure lets you filter and aggregate them. Equally important is the ability to correlate the events belonging to a single request or user session, usually through an identifier carried across them, so you can reconstruct a sequence rather than seeing isolated lines.
- Emit structured events you can query, not unstructured prose.
- Carry a correlation identifier so the events of one request can be assembled.
- Log at meaningful boundaries and decisions, not at every line of code.
Never log personal data
The most important discipline is what not to log. Logs are often retained, copied, and accessible more widely than the primary data store, so a personal detail written to a log can persist and spread in ways that violate the user’s expectations. Identifiers, message contents, and anything that singles out a person should be excluded from logs, with redaction applied before anything is written.
Enough signal, not maximum volume
The right amount of logging for a small app is the least that still answers the questions you are likely to ask: error conditions with enough context to act, key state transitions, and the boundaries of important operations. Logging more than this raises cost, slows searches, and increases the chance of capturing something you should not. Observability is a balance between having the signal you need and not collecting what you do not.
Key takeaways
- Observability is the ability to answer unanticipated questions about what the system did.
- Logging everything buries the signal; record meaningful events you can query.
- Use structured logs and a correlation identifier to reconstruct a request or session.
- Never log personal data, because logs are retained, copied, and widely accessible.
- Aim for the least logging that still answers likely questions.
Frequently asked questions
- Do small apps really need observability?
- Yes. Production problems arise that no test reproduced, and the trail the system left is often the only way to understand and fix them.
- Why not just log everything?
- A flood of undifferentiated logs buries the relevant signal and raises cost and risk. Structured, meaningful events you can query are far more useful.
- What should never go into a log?
- Personal data: identifiers, message contents, and anything that singles out a person, because logs are retained, copied, and accessible more widely than the main data.
References
About the author
Mykhailo Boichuk
Co-founder & Vice-President
Mykhailo is an engineer who builds native applications and the systems behind them. He concentrates on macOS and iOS performance, local-first data architecture, and the synchronization problems that come with offline-capable software.