Error tracking is collecting the exceptions your application throws in production, each with the context needed to fix it, grouping repeats of the same fault into one issue, and alerting you when a new one appears. Errors that would otherwise sit unread in a log file, or reach you through a customer, become a list you can work through.
How it works
The application hands every exception it does not handle to a reporting step. In Laravel that is the exception handler: by default it writes exceptions to the log, and its report step is where an external error tracking service plugs in.
A report carries the exception class, its message and its stack trace, the three fields the OpenTelemetry conventions name for recording an exception. Context comes with it: the URL or the command, the user, the environment.
The tracker then decides which reports belong to the same fault, from details such as the class, the message and the place it was thrown, and counts them as occurrences of one issue with a first and a last seen time. An issue has a state, such as open or resolved, so an error that comes back after a fix can be told apart from one that never went away.
Why it matters
A log writes an exception once for every time it happens, so a fault that fires a thousand times buries the one that happened once. Grouping shows how many distinct problems there are and which of them are new. An alert on a new error means you hear about a broken checkout from the tracker, not from the customer who could not pay.
What can go wrong
- The code catches an exception and carries on without reporting it, so the tracker never sees it.
- An id or a timestamp in the message makes every occurrence look different, and one fault splits into many issues.
- A burst of one exception, for example while a third-party service is down, drowns everything else. Laravel's documentation suggests throttling reported exceptions for this case, and an alert on every occurrence leads to alert fatigue.
- The context sent with a report holds a password, a token or personal data.
- Errors from staging and production land in one list, and a test failure reads like a production problem.
Check it
Ranetrace's error monitoring takes exceptions from its PHP and Laravel SDKs and JavaScript errors from the frontend, groups each error's occurrences with when it was first and last seen, and keeps environments apart for PHP errors. Its alerts go out, for example, on an error's first occurrence and when a resolved error comes back.
Read more
Start monitoring today
Websites go down and code throws errors. Ranetrace tells you when it happens to yours, why it matters and what to do next.