Welcome!

Blog Feed Post

Tales from the Field: Debugging Applications in Production with Information Points

Production debugging is one of the most difficult parts of the job for any software engineer and one of the most underrated problems faced by IT. Developers usually rely on logs to troubleshoot production issues. They go through hundreds of lines of logs, sorting through complex logic as their stress levels rise, acutely aware that the bug they are looking for could be crippling the business. It’s painstaking, laborious work at best, and all too often the relevant logs are not available.

Developers need better tools to debug production issues faster. At stake is not only lost revenue but often something even more valuable: The trust of their customers.

I’ve spent many late nights staring at my computer trying to find the root cause of an issue in production environments. The general lack of insights into what is happening in the production environment makes this hard enough, but if the code has been inherited (legacy code) or involves timed elements such as background processes or cron jobs, things get even more difficult to track down. Engineers (myself included) often don’t have a clear understanding of the entire application, so it’s hard to know if the issues we’re tracking down are related to a change we made, or something that changed in another part of the codebase. We look for answers in the logs, but it feels like we are hunting for a needle in a haystack. Adding additional logs in search of more relevant data only increases the amount of proverbial straw and is probably not an option if the issue we are dealing with is time-sensitive.

During these late nights, I used to wish that production environments were more like a local developer environment where debugging is relatively easy, thanks to tools like the debugger in my local IDE or browser. Wouldn’t it be nice to have a debugger or a dynamic logging device in production? Developers need a magic wand (or magnet) to get all the needles from the haystack of production logs! Well, it turns out that the Information Points feature of AppDynamics was the magic wand I was looking for.

What are information points?

If you are not familiar with AppDynamics, consider an information point as a tool that allows you to inspect the input parameters or return value of any invocation of a method along with additional metrics about the execution time of the method for each invocation. If you are familiar with AppDynamics, information points are similar to data collectors in business transactions. However, while data collectors show application data in the context of a business transaction, information points reflect data state across all invocations of a method, independently of business transactions. They also let you apply computations to the values, for example, representing the sum or average for a method return value or input parameter.

Below is an example of how I have used information points as a production debugging tool. You will notice the debug flow is very similar to the way developers find and fix issues using an IDE.

One of our customers was reaching the data limits for one of the metadata items we collect, and the customer was adamant that the stale/old data was not getting purged. Our operations engineers increased the limits a couple of times, and the issue got escalated to my engineering team. The system was designed in a way where the stale/old data was deleted by a background cron task. The same background task was used for all similar data, so it was hard to diagnose what was going on and whether the background task to clean old data was being invoked for that particular account and metadata records. There were no relevant logs available to debug this issue further.

To resolve the issue I created a new information point on the Information Point Page with a few clicks as shown in Figure 1 (below). The information point was created on the delete method of the background task for that particular account and metadata record. I also created a custom metric for the return value which returned the number of deleted entities.

Code block for the delete background task:

DeleteBackgroundTask {

public int deleteStaleEntries(int accountId, String entityType) {

Delete code…

}

}

Screen Shot 2017-10-26 at 8.38.56 PM.png

Figure 1: Information points created with custom metric.

Within the next few minutes, I was able to confirm that the background job to delete stale entries was triggered every 10 minutes and was working as per design. I also was able to see how many records were deleted.

Screen Shot 2017-10-26 at 8.39.32 PM.png

Next, I created another information point for this particular account on the method that was creating the stale entries. This information point had a custom metric that collected the number of records being created. From this information, I was able to determine that the customer was creating these records at a rate higher than the documented limits, and our delete task could not keep up. This information was then conveyed to the customer, they were able to adjust their usage, and the entire issue was solved within less than hour.

The Information Points feature in AppDynamics has truly changed my life. Information points help me understand what is going on in real time, and I use them regularly to debug production issues. They are also used by our quality engineers to test complex background tasks. With information points, problems can be easily isolated to a particular method or segment of code.

I have just one word of caution: There is a limit on the number of information points that can be added to the system as collecting too many can impact your own application performance. Please make sure you delete the information points that you create during your debugging session so you are prepared for the next one. Happy debugging!

For more details on information points, check out the docs here. You can also learn more about AppDynamics with our guided tour or by scheduling a demo today.

The post Tales from the Field: Debugging Applications in Production with Information Points appeared first on Application Performance Monitoring Blog | AppDynamics.

Read the original blog entry...

More Stories By AppDynamics Blog

In high-production environments where release cycles are measured in hours or minutes — not days or weeks — there's little room for mistakes and no room for confusion. Everyone has to understand what's happening, in real time, and have the means to do whatever is necessary to keep applications up and running optimally.

DevOps is a high-stakes world, but done well, it delivers the agility and performance to significantly impact business competitiveness.

Latest Stories
Whenever a new technology hits the high points of hype, everyone starts talking about it like it will solve all their business problems. Blockchain is one of those technologies. According to Gartner's latest report on the hype cycle of emerging technologies, blockchain has just passed the peak of their hype cycle curve. If you read the news articles about it, one would think it has taken over the technology world. No disruptive technology is without its challenges and potential impediments t...
CloudEXPO New York 2018, colocated with DevOpsSUMMIT and DXWorldEXPO New York 2018 will be held November 12-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI and Machine Learning to one location.
Hackers took three days to identify and exploit a known vulnerability in Equifax’s web applications. I will share new data that reveals why three days (at most) is the new normal for DevSecOps teams to move new business /security requirements from design into production. This session aims to enlighten DevOps teams, security and development professionals by sharing results from the 4th annual State of the Software Supply Chain Report -- a blend of public and proprietary data with expert researc...
DXWorldEXPO LLC announced today that Nutanix has been named "Platinum Sponsor" of CloudEXPO | DevOpsSUMMIT | DXWorldEXPO New York, which will take place November 12-13, 2018 in New York City. Nutanix makes infrastructure invisible, elevating IT to focus on the applications and services that power their business. The Nutanix Enterprise Cloud Platform blends web-scale engineering and consumer-grade design to natively converge server, storage, virtualization and networking into a resilient, softwar...
So the dumpster is on fire. Again. The site's down. Your boss's face is an ever-deepening purple. And you begin debating whether you should join the #incident channel or call an ambulance to deal with his impending stroke. Yes, we know this is a developer's fault. There's plenty of time for blame later. Postmortems have a macabre name because they were once intended to be Viking-like funerals for someone's job. But we're civilized now. Sort of. So we call them post-incident reviews. Fires are ne...
The digital transformation is real! To adapt, IT professionals need to transform their own skillset to become more multi-dimensional by gaining both depth and breadth of a wide variety of knowledge and competencies. Historically, while IT has been built on a foundation of specialty (or "I" shaped) silos, the DevOps principle of "shifting left" is opening up opportunities for developers, operational staff, security and others to grow their skills portfolio, advance their careers and become "T"-sh...
This session will provide an introduction to Cloud driven quality and transformation and highlight the key features that comprise it. A perspective on the cloud transformation lifecycle, transformation levers, and transformation framework will be shared. At Cognizant, we have developed a transformation strategy to enable the migration of business critical workloads to cloud environments. The strategy encompasses a set of transformation levers across the cloud transformation lifecycle to enhance ...
Authorization of web applications developed in the cloud is a fundamental problem for security, yet companies often build solutions from scratch, which is error prone and impedes time to market. This talk shows developers how they can (instead) build on-top of community-owned projects and frameworks for better security.Whether you build software for enterprises, mobile, or internal microservices, security is important. Standards like SAML, OIDC, and SPIFFE help you solve identity and authenticat...
Lori MacVittie is a subject matter expert on emerging technology responsible for outbound evangelism across F5's entire product suite. MacVittie has extensive development and technical architecture experience in both high-tech and enterprise organizations, in addition to network and systems administration expertise. Prior to joining F5, MacVittie was an award-winning technology editor at Network Computing Magazine where she evaluated and tested application-focused technologies including app secu...
Mike is managing director in Deloitte Consulting LLP's Cloud practice, responsible for helping clients implement cloud strategy and architecture to drive digital transformation. Beyond his technology experience, Mike brings an insightful understanding of how to address the organizational change, process improvement, and talent management challenges associated with digital transformation. Mike brings more than 30 years of experience in software development and architecture to his role. Most recen...
Having been in the web hosting industry since 2002, dhosting has gained a great deal of experience while working on a wide range of projects. This experience has enabled the company to develop our amazing new product, which they are now excited to present! Among dHosting's greatest achievements, they can include the development of their own hosting panel, the building of their fully redundant server system, and the creation of dhHosting's unique product, Dynamic Edge.
Your job is mostly boring. Many of the IT operations tasks you perform on a day-to-day basis are repetitive and dull. Utilizing automation can improve your work life, automating away the drudgery and embracing the passion for technology that got you started in the first place. In this presentation, I'll talk about what automation is, and how to approach implementing it in the context of IT Operations. Ned will discuss keys to success in the long term and include practical real-world examples. Ge...
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...