This article is sponsored by Airbrake. Thank you for supporting the partners who make SitePoint possible.
Modern software applications are flexible, capable tools. These applications empower users with a wide range of abilities, from communicating with loved ones and coworkers, to gleaning knowledge from millions of crowdsourced articles, to diagnosing afflictions and potentially saving lives, and even to building the next great application, which might provide even more fantastic possibilities.
Yet the Facebooks, Wikipedias, and Watsons of the world haven’t become the huge successes that they are without many bumps along the way. Developing software is difficult, but for most modern applications, releasing your project out into the wild for the public is only the first step. Monitoring and maintenance are critical components for most public-facing applications after release, to ensure the product can handle the load, is performing as expected, is financially viable, and, of course, doesn’t collapse under the weight of unexpected errors.
然而，全球的Facebook，Wikipedias和Watsons并没有取得巨大的成功，而在此过程中却没有很多颠簸。 开发软件很困难，但是对于大多数现代应用程序而言，将项目公开发布给公众只是第一步。 监视和维护是发布后大多数面向公众的应用程序的关键组成部分，以确保产品能够处理负载，按预期运行，在财务上可行，并且当然不会因意外错误而崩溃。
While not particularly common, even within projects where the entire software development life cycle was smooth sailing up until production launch, nothing can sink the ship quicker than a slew of errors, which may grind the service itself to a halt, or in the worst case, crash the application entirely.
Enter the power of error monitoring software. Even during development, but particularly after release, error monitoring software can provide that life line your organization needs to ensure your software remains fully functional. Any unforeseen errors can quickly be identified, examined, and resolved, without the need for user-generated feedback or error reports.
输入错误监视软件的功能。 即使在开发过程中，尤其是在发布后，错误监视软件也可以提供组织所需的生命线，以确保软件保持完整功能。 可以快速识别，检查和解决所有无法预料的错误，而无需用户生成反馈或错误报告。
To better examine why your business could benefit from error monitoring software, we’ll explore the advantages by answering questions related to the Six Ws: Who, What, When, Where, Why, and How. By the end, you should have a better understanding of how your business may benefit by utilizing error monitoring software for your own projects.
谁收到此错误？ ( Who Is Receiving This Error?)
Error monitoring software is designed to immediately inform you and your team when an error occurs, whether through email, via code hooks, or integrations with other services. Best of all, since the error monitor can be easily hooked into your own application code, you’ll receive detailed reporting information on the error or issue that occurred, including appropriate user data. This might include associated account information for the afflicted user, the user’s location when the error occurred, device the user was using, operating system version, browser version, session data, and so forth. In short, error monitoring software can automatically provide you with detailed information about the individuals who are experiencing errors, so you can better serve your users.
错误监视软件旨在在发生错误时立即通知您和您的团队，无论是通过电子邮件，通过代码挂钩还是与其他服务集成。 最重要的是，由于错误监视器可以轻松地挂接到您自己的应用程序代码中，因此您将收到有关发生的错误或问题的详细报告信息，包括适当的用户数据。 这可能包括受苦用户的关联帐户信息，发生错误时的用户位置，用户正在使用的设备，操作系统版本，浏览器版本，会话数据等。 简而言之，错误监视软件可以自动为您提供有关遇到错误的个人的详细信息，从而可以更好地为用户服务。
谁负责解决错误？ ( Who Is Assigned to Resolving the Error?)
Modern monitoring software includes tools for tracking and resolving issues throughout the entire team. This ensures that not only will you be aware of new exceptions as they occur, but you can monitor which team members are working on fixes for which errors. By employing common prioritization techniques across the suite of errors you’ve received, your team can easily track issues and formulate the best plan to tackling them in order of importance.
现代监控软件包括用于跟踪和解决整个团队中的问题的工具。 这样可以确保您不仅可以在发生新异常时知道它们，还可以监视哪些团队成员正在为哪些错误进行修复。 通过在收到的所有错误中采用通用的优先级排序技术，您的团队可以轻松地跟踪问题并制定最佳计划以按重要性顺序解决它们。
发生什么确切错误？ ( What Is the Exact Error That Occurred?)
Error monitoring software allows you to see the exact nature of the error, in addition to the detailed metadata included with the exception. For example, when an error occurs using Airbrake.io’s error monitoring software, Airbrake is able to report the error type/object, error message, parameters, a detailed backtrace, the environment in which the error occurred, the client machine data, the called API method that generated the error, the file that caused the error, and much more.
Using an error monitoring service allows for real-world debugging to occur without the need for user-generated feedback or reports. When issues arise, the monitor will provide the same level of detail (and often more) than would be available to a developer who was performing step-by-step debugging on the source code.
支持哪些编程语言和平台？ ( What Programming Languages and Platforms Are Supported?)
我可以使用哪些服务集成？ ( What Service Integrations Can I Use?)
Most monitoring services are designed to slide right into your existing workflow, without the need for additional work or added headaches. To simplify this process, most error monitors are compatible with the most popular development services, like Slack, JIRA, GitHub, BitBucket, Campfire, Trello, and many more. Moreover, a good error monitoring service will provide access to webhooks and an integration API, allowing your team to create a simple integration that enhances your workflow.
大多数监控服务旨在直接进入您现有的工作流程，而无需其他工作或增加麻烦。 为了简化此过程，大多数错误监视器都与最流行的开发服务兼容，例如Slack，JIRA，GitHub，BitBucket，Campfire，Trello等。 此外，良好的错误监控服务将提供对Webhooks和集成API的访问，使您的团队可以创建简单的集成来增强您的工作流程。
错误何时发生？ ( When Did the Error Occur?)
Error monitoring software allows you and your team to be informed immediately when errors occur. Yet, just as importantly, the software will also keep historical, timestamped records of all errors. Not only does this allow you to pinpoint exactly when a particular issue or type of error occurred, but a friendly interface aggregates similar errors based on criteria you specify, or even automatically. Thus, not only can you see when any single instance of an error occurred, but you can view charts and graphs with information about issues over time, providing you with a bird’s-eye view of the progress, and how particular builds or patches may have improved or impacted the occurrence of that issue.
错误监视软件可让您和您的团队在发生错误时立即得到通知。 然而，同样重要的是，该软件还将保留所有错误的历史记录，带有时间戳的记录。 这不仅使您可以精确地确定何时发生特定问题或错误类型，而且友好的界面会根据您指定的条件甚至自动地汇总类似的错误。 因此，您不仅可以查看何时发生任何单个错误实例，还可以查看带有有关随时间变化的问题的信息的图表，从而可以大致了解进度，特定构建或补丁的方式改善或影响了该问题的发生。
错误监视何时合适？ ( When Is Error Monitoring Appropriate?)
The short answer: throughout the entire software development life cycle. The longer answer is that it depends on the needs of your team and your project. At the very least, error monitoring services excel once a public beta or release is underway, as the core power of such a service is providing detailed error feedback from users in the wild, without the need for intervention on your part.
简短的答案：贯穿整个软件开发生命周期。 更长的答案是，这取决于您的团队和项目的需求。 至少，一旦公开Beta或发行版开始，错误监控服务就将脱颖而出，因为此类服务的核心功能是在野外为用户提供详细的错误反馈，而无需您亲自干预。
该错误在代码中的何处产生？ ( Where In the Code Did This Error Originate?)
Knowing that an error occurred is useful, but knowing exactly where the error occurred within your code is exactly the kind of detail necessary to quickly and accurately find the cause and get it resolved. Error monitoring software provides detailed reports that include not just the methods or functions that generated the error, but the detailed backtrace, with the exact lines of code that led to this issue. Furthermore, when integrated with GitHub or GitLab, any part of the backtrace can be clicked through to take you to that exact line in the source code.
明知发生错误是有用的，但确切知道哪里你的代码中发生的错误是完全必要的，以快速，准确地查找原因，寻求解决办法的那种细节。 错误监视软件提供详细的报告，这些报告不仅包括生成错误的方法或函数，还包括详细的回溯，以及导致此问题的确切代码行。 此外，当与GitHub或GitLab集成时，可以单击回溯的任何部分以将您带到源代码中的确切行。
为什么错误监视很重要？ ( Why Is Error Monitoring Important?)
Creating functional and effective software without an error monitoring service to assist you is certainly possible. However, particularly for projects with growing user bases, doing so requires a great deal of foresight and a massive amount of upfront development time. Not only must you heavily emphasize bug squashing throughout the life cycle, but you must also have components in place within your released code that can provide detailed error feedback from users in the wild, so when something (inevitably) goes wrong after production, your team can be alerted and quickly respond. Certainly not an impossible task, but this requires a great deal of additional work that can be handled, easily and inexpensively, by error monitoring software.
当然，可以创建没有错误监控服务的实用有效软件来为您提供帮助。 但是，特别是对于具有不断增长的用户群的项目，这样做需要大量的远见和大量的前期开发时间。 您不仅必须在整个生命周期中全力以赴地强调bug压缩，而且还必须在已发布的代码中拥有适当的组件，这些组件可以提供野外用户的详细错误反馈，因此当生产后(不可避免)出现问题时，您的团队可以被提醒并快速响应。 当然，这不是不可能的任务，但这需要大量其他工作，这些工作可以通过错误监视软件轻松，廉价地进行处理。
Put simply, error monitoring software is a safety net. It doesn’t allow your team to forego all levels of quality assurance leading up to and after release, but instead, it provides some breathing room. With an error monitor in place, you’ll know that any unforeseen bugs, which do slip through the cracks and pop up after launch, will be immediately found and sent your way, so your team can quickly respond and get fixes out ASAP.
简而言之，错误监视软件是一个安全网。 它不允许您的团队放弃发布之前和发布之后的所有级别的质量保证，而是提供一些喘息的空间。 有了错误监控器，您将知道会立即发现并发送给您发送通知的所有无法预料的bug，这些bug确实会从裂缝中溜走并弹出，因此您的团队可以快速做出响应并尽快修复。
为什么会发生错误？ ( Why Did the Error Occur?)
In most cases, once software is launched to production, getting detailed error reports often requires asking users affected by the error to take time out of their day to dig through directories for a crash dump or error log, and email or post it to your support forums. Even in the case where your application can provide automated error dump reports to your team, without the need for user intervention, a team member then needs to either manually comb through those reports, or to develop a software component that can perform that task for you.
With error monitoring software, those problems are largely eliminated. To figure out why an error occurred, you simply open that particular report within the user-friendly interface, and scan through the plethora of information attached to that error instance. Rather than asking a user to provide a crash dump, you can simply look over the error, moments after it occurred and you were alerted, to see exactly what part of the source code caused the issue, and begin working toward a resolution.
使用错误监控软件，可以消除这些问题。 要弄清楚为什么会发生错误，您只需在用户友好的界面中打开该特定报表，然后浏览该错误实例附带的大量信息。 无需让用户提供故障转储，您可以简单地查看错误，错误发生后的时刻以及收到警报的信息，以查看源代码的确切部分导致了该问题，并开始着手解决问题。
我们的软件应用程序有多少错误？ (How Many Errors Does Our Software Application Have?)
Most error monitoring services provide detailed statistics, charts, and historical graphs about the errors within your software. Not only can you view aggregate numbers for the overall system, but you can drill down with filtered queries and searches, to get data about errors that may have occurred only in production, within the last 1 month, that contain the word IO. This makes it easy to evaluate trends, so you can quickly determine if a particular type of error is occurring less frequently, as a result of a recent patch aimed at fixing it.
大多数错误监视服务都提供有关软件中错误的详细统计信息，图表和历史图表。 您不仅可以查看整个系统的总数，还可以使用过滤的查询和搜索进行深入分析，以获取有关仅在生产中在过去1个月内包含IO的错误的数据。 这使得评估趋势变得容易，因此，由于最近针对此错误进行了修补，因此您可以快速确定特定类型的错误是否出现的频率更低。
如何开始使用错误监视软件？ ( How Do I Get Started with Error Monitoring Software?)
Integrating and beginning to use error monitoring software is very simple. In most cases, simply sign up for a free trial account, locate the programming language or platform that suits your needs, follow the simple instructions to integrate with your project, and test it out by intentionally creating an error. Most monitoring services allow you to be up and running in under five minutes.
集成并开始使用错误监视软件非常简单。 在大多数情况下，只需注册一个免费试用帐户 ，找到适合您需求的编程语言或平台，按照简单的说明将其与您的项目集成，然后通过故意创建错误进行测试。 大多数监视服务使您可以在五分钟内启动并运行。
From there, you can improve the workflow by integrating the error monitoring software with other third-party services your team uses, such as source control and issue tracking. Once complete, you can breath easier, knowing that all future errors will be automatically tracked and reported across your team, providing you with a great deal of additional quality control throughout development and well after launch to production.