.NET monitoring with Datadog APM and distributed tracing | Datadog
New announcements for Serverless, Network, RUM, and more from Dash! New announcements from Dash!

.NET monitoring with Datadog APM and distributed tracing

Author Emily Chang
Author James Leung
/ / / / /
Published: April 5, 2019

Since it was first introduced in 2002, Microsoft’s .NET Framework has garnered a robust user base that includes organizations like UPS, Stack Overflow, and Jet.com. And now, thanks to the rise of the .NET Core runtime, this high-performance framework also supports cross-platform development. To provide deeper visibility into all of these environments, we are pleased to announce that Datadog APM and distributed tracing are generally available for .NET Framework and .NET Core applications. With this addition, .NET joins a growing list of supported frameworks and languages in APM.

.NET monitoring in Datadog APM flame graph

Unleash Datadog’s .NET monitoring on your applications

Datadog APM gives you deep visibility into your .NET applications within minutes. In most cases, you’ll see data flowing into your account without changing a single line of code. Our open source .NET tracing library automatically instruments web frameworks (ASP.NET MVC, ASP.NET Core MVC, ASP.NET Web API 2), ADO.NET-compatible databases like SQL Server and PostgreSQL, and other data stores (e.g., Redis, Elasticsearch, and MongoDB), with more integrations in the works. Datadog’s .NET client includes support for OpenTracing, the vendor-neutral standard for distributed tracing, so you can easily port your applications without making major updates to your code.

Datadog APM tracks requests as they travel across distributed caches, data stores, and cloud services in your environment. These are just some of the features that can help you analyze and understand all of this data in real time:

  • The Service Map automatically maps out your microservices architecture based on data collected from APM
  • Service overview dashboards provide a summary of each service’s health, error rates, and anomalous performance trends
  • Trace Search & Analytics helps you find “needle in the haystack” request traces for investigating errors and bottlenecks
  • Watchdog uses machine learning to alert you to automatically detected anomalies in your .NET apps

Using data you’re already collecting from APM, the Service Map automatically maps out your application architecture so that you can understand how requests flow across the services in your environment and identify dependencies between services. This provides a great starting point for troubleshooting issues across your microservices.

Explore an overview of each .NET service

From the Service Map, you can drill down to inspect the performance of any individual service. APM automatically generates an overview dashboard with key metrics (request throughput, latency, and errors) for each service in your environment. You’ll also have the option to enable suggested alerts that will notify you of elevated error rates, high 90th-percentile latency, and other issues.

.NET monitoring in Datadog APM dashboard

Optimize application performance with the Span Summary

As Datadog APM traces requests across services in your environment, it breaks down each trace into spans. Each span represents a specific unit of work completed within a trace (such as an API call or a database query). From the service overview dashboard, you can click on any endpoint to see a Span Summary—a breakdown of the frequency and latency of function calls or operations completed by your services. You can use this summary to quickly identify the areas that you can focus on optimizing first, to get the maximum return on investment. Below, it’s clear that we can improve latency the most by optimizing our todoes controller, which is accounting for almost all the latency in our requests.

.NET monitoring in Datadog APM looking at Span Summary to see more frequently occurring spans

Investigate issues using flame graphs

Although high-level overview dashboards are useful for keeping tabs on the health of your applications, you can also get finer-grained insights by inspecting each trace in a flame graph. If you click on a span, you’ll see detailed metadata about that operation (e.g., the exact SQL query executed).

In the example below, an ASP.NET MVC web application returned a 500 error after trying to execute a SQL Server query. The flame graph allows us to visually identify the bottlenecks in processing this request. We can also look at the full stack trace to help diagnose and debug the error.

Correlate traces with host metrics and logs

Each flame graph is deeply integrated with other types of monitoring data you’re collecting from your applications and infrastructure. As you’re inspecting a flame graph, you can navigate to the “Host” tab to see more context about the host. This allows you to quickly get a sense of host-level resource constraints (CPU, memory, network bandwidth) at the time of the request. Datadog automatically picks up metadata from Azure and other technologies, and applies it as tags to your APM metrics and request traces, so you can connect the dots across related components of your environment. As shown in the example below, when you click on a span you can see the Azure VM’s availability zone and resource group, among other information.

Inspect .NET application request trace from Datadog APM and correlate with host-level metrics by selecting the Host Info tab

Furthermore, if you’re using Datadog log management to automatically collect and process logs, you can navigate to the “Logs” tab to view relevant logs from your services, which can help you get additional context around the trace. Visualizing all of this information in one pane of glass can help you identify the source of any issue, whether it’s a bug in your application code, a slow SQL query, or an overloaded server.

Inspect .NET application request trace from Datadog APM and correlate with host-level logs by selecting the Logs tab

Get customer-level visibility with Trace Search & Analytics

Trace Search & Analytics makes it easy to investigate issues in your .NET applications and understand how they impact your business. If a user reports an issue, Trace Search & Analytics can help you investigate by pinpointing the relevant trace events collected from that specific user. You can use tags and facets to quickly slice and dice your distributed request traces across any dimension—whether it’s an endpoint, a single SQL query, a specific checkout ID, or a combination thereof—and drill down to inspect the exact trace events you need.

Pinpointing errors in .NET apps with Datadog APM and distributed tracing Trace Search & Analytics

Watchdog auto-alerts you to performance issues

While alerts provide critical visibility into known issues, Watchdog goes a step further by helping you track potentially unknown problems in your application, where you haven’t set any alerts. Watchdog autonomously tracks your services and keeps you posted about application performance anomalies, such as elevated error rates on specific endpoints, anomalous spikes in latency, or network issues with your cloud provider. When it finds something potentially noteworthy, it highlights the timeframe in question and provides a plain-language summary of what happened, so that you can understand the scope of the issue and how it could impact your users.

Connecting the dots across .NET apps and infrastructure

Datadog integrates with cloud services like Azure and AWS so you can monitor your .NET applications and your infrastructure in one place. For example, you can add a “Service Summary” widget to a dashboard to see a high-level overview of your .NET application alongside health and performance metrics from the application’s underlying Azure VMs and other related cloud services.

Dive into .NET monitoring with Datadog

Support for .NET is now generally available in Datadog APM—check out our documentation to start getting deeper visibility into your applications. If you don’t have a Datadog account, you can sign up for a to monitor your .NET applications and the rest of your environment in one place.