When operating any information processing system, the user, developer and sysadmin have to face an issue of error handling. How can we deal with this problem?
When it comes to dealing with errors, there are a few different approaches we can take:
– Simply not have them at all 😉
– Ignore them
– Gather, analyse and draw conclusions based upon said analysis to make suitable corrections
Unfortunately, the only programmers, who claim they don’t do any mistakes, are the ones that effectively ignore them. That’s why the only efficient strategy to coping with errors is recording and analysing them. I’t also important to store all the error-related logs in a secure way, because they might contain some restricted or confidential details. In addition, make sure the access to error logs is fast and convenient – otherwise it may be hard to convince developers to analyse the issues systematically.
After analysing existing solutions we decided to use a system, that is considered standard in the area of error analysis.
Sentry.io offers a cloud-based solution, ready to integrate with information processing systems written in most of the popular languages and technologies. Regrettably, the type of data processed in Mentax SA rules out solutions hosted in public clouds. Luckily, SENTRY is an open source tool, which can be easily set up in your own server room. And that’s the solution we’ve chosen. Thanks to docker, launching and updating SENTRY and all the tools (a dozen or so) required for proper operation runs smoothly (however, should your company need any help – our IT department is happy to help).
What are the main advantages of SENTRY’s centralized error logs collecting?
- Errors from various systems and servers are all gathered in the same place. It’s especially important today, when working with microservices – systems that are launched on many different servers or server clusters, often in containers – makes it virtually impossible to browse files with error logs directly in the app or on it’s server.
- One and the same error can occur hundreds of times. On the other hand, some minor notice can hide more serious problem. SENTRY aggregates errors of the same type and informs us where the error occured and which users does it concern. It allows us to prioritize issues that should be addressed first.
- Along with the error message, developer can gain access to number of details about user’s system’s condition at the time the error occured and precise place in code where the error appeared. Access to those details speeds up the debugging process significantly. It’s possible not only with scripting languages, but also fully compiled apps, thanks to SENTRY’s source map, which can be attached to the code and contains instructions for mapping the deployed code back to its original source.
- All of the errors concerning specific project or function can be shared in one place in a unified way. SENTRY allows us to run multiple projects, which automatically group notifications together on one instance. Breakdown by projects allows to restrict access to errors related to specific system or environment to specific group of developers. That feature makes it easier for them to focus their work on subjects that concern them directly. It’s also possible to assign particular issue to a specific person, who is to resolve it. And on top of all that, generating notifications in JIRA, Gitlab and other project management systems is also possible.
- Every error might be related to the specific version of the app. This way it’s easier to find the exact moment the issue occured and identify version in which the bug should be fixed. SENTRY will also notify us about reappearence of error once it’s already supposed to be removed.
- You can set a variety of notifications and alerts that can be forwarded to your email, sent as a text or other IM message the moment the problem emerges, it can also be done in a form of collective reports. All of it in legible and appealing graphic design.
Advantages listed above barely scratch the surface of all of SENTRY’s perks.
If it’s properly integrated with testing process and app release, it can become a key instrument for tracking, analysis and resolving occuring errors and issues. It can even conduct analysis regarding efficiency and operating time of individual app elements, but that’s a subject for another article.
To learn more about SENTRY click here: sentry.io Good luck analysing errors!
This article is the first in „App monitoring” series. Feel free to read our remaining entries: Log collection and Software metrics. They will soon be posted on our blog.