Finding the step that failed
Logging records selected events as an application runs: a background task starts, an external service responds, or a database read fails. These entries help you reconstruct the sequence later. They can only tell you about events the application actually recorded.
An overnight inventory sync might produce this deliberately minimal entry:
time=2026-11-10T03:12:30Z level=error operation=inventory_sync step=database_read duration_ms=30000 outcome=timeout
It identifies the step and how long it waited. It does not establish why the database failed to respond in time. To investigate that, check surrounding entries and the database itself.
Choosing useful fields
A timestamp, severity, operation, and result make entries easier to compare. A technical identifier can connect several steps from the same operation. Consistent fields are easier to search than messages written in a different format each time.
Keep passwords, access tokens, and personal data out of these diagnostic entries. Complete request contents can contain those values too. Select the technical fields you need instead of recording every input.
What logs, errors, and metrics tell you
An error is one kind of event a log can record. Logs can also contain successful operations and warnings. Metrics summarize many events, such as the number of failed syncs per hour. They reveal a pattern, while a log entry provides details about a particular operation.
A service such as Sentry collects and groups errors with technical context. This complements log searches; it does not automatically provide a record of everything the application does.
Where to look in MainPath
The Operations documentation places logs on the server inside the Docker containers. Support can help you access them. For the log entries you add to your application, decide which events to record, who can read them, and how long they are needed.
Sentry captures errors once you connect your own account under Connections and enable Sentry for the component under Features. Errors appear there with a stack trace and release version. Error tracking explains the setup.