Instrumenting .NET Applications
New announcements from Dash: Incident Management, Continuous Profiler, and more! New announcements from Dash!

Instrumenting .NET Applications

After you have installed the AWS integration and the Datadog Forwarder, follow the steps below to instrument your application to send metrics, logs, and traces to Datadog.


Configure the Function

  1. Enable AWS X-Ray active tracing for your Lambda function.
  2. Install the AWS X-Ray SDK for .NET.

Subscribe the Datadog Forwarder to the Log Groups

You need to subscribe the Datadog Forwarder Lambda function to each of your function’s log groups to send metrics, traces, and logs to Datadog.

  1. Install the Datadog Forwarder if you haven’t.
  2. Ensure the option DdFetchLambdaTags is enabled.
  3. Subscribe the Datadog Forwarder to your function’s log groups.

Explore Datadog Serverless Monitoring

After you have configured your function following the steps above, you should be able to view metrics, logs and traces on the Serverless homepage.

If you would like to submit a custom metric, see the sample code below:

var myMetric = new Dictionary<string, object>();
myMetric.Add("m", "coffee_house.order_value");
myMetric.Add("v", 12.45);
myMetric.Add("e", (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds);
myMetric.Add("t", new string[] {"product:latte", "order:online"});