The AppD Approach: How to Monitor .NET Core Apps

April 02 2018

AppDynamics emphasizes performance, flexibility, and functionality in new solution for monitoring .NET Core Applications

For the past few months we’ve been collecting customer feedback on a new agent designed specifically to monitor microservices built with .NET Core. As I discussed a few weeks ago in my post “The Challenges of App Monitoring with .NET Core,” the speed and portability that make .NET Core a popular choice for companies seeking to more fully embrace the world of complex, containerized applications placed new demands on monitoring solutions.

Today we’re announcing the general availability of the AppDynamics .NET Core agent for Windows. Please stay tuned for news about a native C++-based Linux agent we are working on, as well. Our goal is to design agents that address the three biggest challenges of monitoring .NET Core: performance, flexibility, and functionality. As companies modernize monolithic applications and increasingly shift parts of their IT infrastructure to the cloud, these agents will ensure deep visibility into rapidly evolving production, testing, and development environments.

In this blog post, I’d like to share some of the considerations that went into the choices we made in architecting the new agents. It was extremely important to our engineering team to create an agent that is as light-weight and reliable as the microservices and containers we monitor without compromising functionality. One change we made was removing the Windows Service that required a machine-level install, which increased reliability and freed up CPU and considerable memory (70 MB). In addition, the new .NET Core agents for Windows require just half the disk space of traditional .NET agents and consist of only two DLLs and two configuration files.

Our approach to monitoring .NET Core recognizes that the deployment of .NET Core applications is fundamentally different from those built with the full .NET framework. In Windows environments deployment was dependent on both the framework and the machine, and our agent was installed using the traditional Windows installer (via MSI files). In contrast, the advantage of .NET Core is that it runs on a variety of platforms and runtimes.

Last year, our team made the decision we would mirror .NET Core’s flexibility in deployment. Unlike some other app monitoring solutions, the AppDynamics .NET Core agents reside next to the application. This architecture means containers can be spun up and spun down or moved around without affecting visibility. Operations engineers can integrate AppDynamics in any way that makes sense, while developers are able to leverage NuGet package-management tools. The pipeline for deploying and installing the agents on each platform is the same as for deploying applications and microservices there. For example, agents can be deployed with Azure Site Extensions for Azure or buildpacks for Pivotal Cloud Foundry (available soon). In the case of Docker, the agents can be embedded in a Docker image with engineers setting a few environment variables for monitoring to then proceed automatically. During our recent beta it was great to see our customers deploying the AppDynamics .NET Core agents to Docker, Azure App Services, Azure Service Fabric, Pivotal Cloud Foundry, and other environments.

How it works

The .NET Core agents deliver all the functionality and automation you expect from  AppDynamics. The agents auto-detect apps, which in the case of .NET Core could be running on Kestrel or WebListener. The agents then talk to the AppDynamics Controller providing everything from business and performance-related transaction metrics to errors, and health alerts.

Similar to the traditional .NET agent, the new .NET Core agents are particularly suited to monitoring the asynchronous transactions that often characterize microservices. We automatically instrument asynchronous apps and provide deep visibility at the code level with built-in visualizations such as snapshots and full-stack call graphs that include unrestricted views into the ASP.NET Core middleware.

Although certain Windows-environment specific machine metrics like performance counters are not available to the new .NET Core agents due to the new cross-platform architecture, as I previously discussed, AppDynamics continues to provide cross-stack and full-stack visibility by automatically correlating the metrics collected by the .NET Core agents with infrastructure and end-user metrics. This allows transactions to be traced from an end user to an application or microservice through databases such as Azure SQL, SQL Server, and MongoDB, across distributed tiers, and back to the end user, automatically discovering dependencies and identifying anomalies along the way. These unified full-stack and cross-stack topologies are critical to developing and deploying microservices that are responsive to business needs.

Drive business outcomes

AppDynamics’ Business iQ connects application performance with business results using a variety of data collectors to pull detailed, real-time information on everything from users to pricing. With the new .NET Core agents, it is even easier to create contextual information points to collect custom data from microservices. Thanks to run-time reinstrumentation, engineers can make changes in existing information points without restarting the microservice.

Customers have asked whether this functionality will be available in hybrid environments. Yes, this is one of the great advantages of the new .NET Core agents. Customers will have visibility into the performance of their business and their applications across on-premises installations running on the full .NET framework and .NET Core applications running on the Azure cloud or other public clouds. Just as .NET Core seeks to enable microservices to move between platforms, AppD is continually working to provide complete, end-to-end visibility into apps and microservices wherever they are running and regardless of the underlying technologies.

It is worth acknowledging that the first generation of .NET core monitoring tools is shipping with a tradeoff between ease of deployment and performance and reliability. Some vendors, especially those who shipped early, emphasize the simplicity and speed of their agents. Deploying AppD’s agents does involve more than “one” step. However, customers assure us that the reliability of our agents combined with their lack of overhead more than compensates for the small, upfront investment made in deployment. In the meantime, our engineering teams remain hard at work tuning and automating deployment and installation processes.

The AppD approach to monitoring .NET Core apps illustrates the importance of a unified solution for maintaining full-stack and cross-stack visibility. The ultimate goal of monitoring is to improve business performance. Ideally, performance issues—and potential problems— are automatically detected before they affect business goals. Achieving this requires real-time data collection on-premises, on IoT devices, and across clouds. It depends on the continuous monitoring of everything—applications, containers, microservices, machines, and databases—as well as on the continuous improvement of AI and machine learning algorithms. Our new agents represent one more step in this exciting journey. Onward!

Meera Viswanathan
Meera Viswanathan is a Senior Product Manager leading product strategy for .NET and Azure at AppDynamics. She previously worked as a developer at Microsoft Dynamics AX and was also a part of the .NET Quality Engineering team at AppDynamics.

Thank you! Your submission has been received!

Oops! Something went wrong while submitting the form