Is It Possible to Effectively Debug Your Cloud Applications?

Emrah Şamdan
5 min readFeb 12, 2021

Debugging code is a skill every developer needs to acquire. As developers work on larger and more complex projects, debugging in the cloud before going to production has become crucial. Even debugging your code by mocking all of your cloud resources in your local environment may not prepare you for what will happen when millions of requests are being processed through that code in production.

To make matters more challenging, modern system architecture, like microservices, can make it more difficult to debug applications on cloud. Microservices help isolate different modules and their functions. This isolation provides many benefits, but it also makes it harder to track bugs and errors.

This is just one of a few reasons a developer might struggle when debugging code. But, there is hope. Developers can debug, they just need tools or third parties that provide features like observability and non-breaking breakpoints to do so.

In this article we will discuss some of these features as well as how they can benefit developers.

How to Debug Without Breaking Anything

Debugging cloud applications is tricky because you can’t just stop running your code to see what is going on. Instead, you need to utilize tools that allow you to track what is occurring without stopping the entire system. These tools should allow you to correlate traces to logs, implement non-breaking breakpoints, and provide clear insights into production logs.

Correlating Traces with Logs and Metrics

One helpful feature in a debugging tool is the ability to correlate traces with logs and metrics. This means that in your application you can push a request (or trace) and track the variables it touches, how long it takes to flow between different services, and other metrics. All of these features can drastically reduce the time it takes to track the root causes of bugs, bottlenecks, and exceptions.

It’s especially helpful if the solution provides the ability to drill down into the detail of the logs. With this feature, a developer can get insight into exactly what portion of code was attributed to the specific outputs and variables are inside of the logs.

Non-Breaking Breakpoints

Breakpoints in development allow a developer to stop their application and see the state of the variables and objects. This is not always necessary.

Non-breaking breakpoints, however, allow you to view stack traces, global variables, and individual watch variables, all without halting your application as you would with a normal debugger.

Utilizing non-intrusive breakpoints allow developers to avoid stopping their code or redeploying/restarting their code base to test their assumptions on what bugs and issues might be causing problems.

Logging and Log Analyzers

Logs by themselves are an old fashion way of tracking bugs. On their own they are time consuming and can be difficult to assess. Thankfully, these days there are many modern software services that can help analyze logs without the need to parse through every line printed out.

These log analyzers can help track and surface metrics, error rates, and abnormal behaviors. In turn, these tools can help developers quickly pinpoint problems in production without directly accessing logs.

Automatic Exception Capture

One of the biggest challenges developers face when debugging is knowing if there is a bug in the first place. In order to detect these issues before they become problems, your team can develop systems that automatically capture and track exceptions as they occur.

Some errors don’t arise often, and these obscure errors can lead to challenges when it comes to tracking down issues. For example, an error may be generated due to the browser version, or because of an anomalous stack overflow that occurs only once every 30 clicks. This can be very difficult to track because the error only happens under very specific circumstances.

Not only is it important to capture these errors. Your team also needs to be able to replicate errors on their end. Using logs and variable capture systems, many of these automatic exception capture systems such as Thundra Sidekick can help replicate these errors.

In addition, systems that automatically track these exceptions can also identify patterns for you. Overall, this can help you debug your cloud applications, regardless of whether or not your system is a microservice.

Modern Architectures Benefit from Cloud Debugging

A popular design pattern in modern software is microservices. As discussed earlier, microservices provide isolated modules of code that aren’t highly coupled with every other piece of code in an application.

For example, an e-commerce site might have services for inventory, shipping, and accounts. This makes it easy for developers to update code and push changes because they don’t need to worry about breaking something in the shipping module when they change the inventory module.

The problem is, this same benefit makes it difficult to assess how variables and requests flow through the entire system.

How Thundra Sidekick Can Help

Thundra Sidekick helps you debug your cloud applications in development, staging, testing, and even in production by increasing observability into a code base.

Debugging Pre-Production Cloud Applications

Thundra eases the life of development teams by pinpointing the root cause of issues in distributed modern architectures. To achieve this goal, Thundra is making available non-intrusive options for debugging cloud applications by focusing on pre-production environments.

Thundra Sidekick enables developers to set non-breaking breakpoints in their applications on the cloud without leaving their IDE. This helps them take snapshots when the code is passing that breakpoint. This is useful for understanding the applications without re-deploying after printing new log lines.

By integrating Thundra Sidekick with Thundra’s existing distributed tracing capabilities, developers gain context by being able to see detailed snapshots and the whole distributed trace in the same pane. Thundra provides end-to-end visibility into cloud applications.

In Thundra Sidekick, non-intrusive breakpoints are referred to as “tracepoints,” to salute their unique integration with distributed tracing. Application teams can reduce the time spent on issues in development environments, staging, and production and also improve development cycle times drastically.

If you’d like to be a beta customer for Thundra Sidekick, you can sign up here and we’ll onboard you with our white-glove service.

Debugging Is Possible with the Right Tools

Debugging cloud applications is not only possible when your team has access to the right tools, it is necessary. The key is to make sure that the tools don’t break anything in your cloud environment as you debug your code.

Thundra has non-breaking breakpoints, autonomous exception capture, and the ability to correlate traces to logs and metrics. Each of these features alone can drastically improve a developer’s debugging experience. However, when they work together you’ll get the next level of observability and debugging capability for cloud applications.

Even debugging and tracing in systems using microservice architecture can be made easier, despite a lack of observability, as long as you pick the right tool for the job.

Originally published at https://blog.thundra.io.

--

--