You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Configure Auto-linking for DynamoDB PutItem](#configure-auto-linking-for-dynamodb-putitem)
44
46
-[Visualize and model AWS services correctly](#visualize-and-model-aws-services-by-resource-name)
45
47
-[Troubleshoot](#troubleshoot)
46
48
-[Further Reading](#further-reading)
@@ -274,6 +276,8 @@ DD_APM_REPLACE_TAGS=[
274
276
]
275
277
```
276
278
279
+
To collect payloads from AWS services, see [Capture Requests and Responses from AWS Services][54].
280
+
277
281
278
282
279
283
## Collect traces from non-Lambda resources
@@ -723,6 +727,50 @@ You can use this approach if, for example, your code has already been instrument
723
727
724
728
To instrument AWS Lambda with the OpenTelemetry API, set the environment variable `DD_TRACE_OTEL_ENABLED` to `true`. See [Custom instrumentation with the OpenTelemetry API][48] for more details.
725
729
730
+
## Using Datadog Lambda Extension v67+
731
+
Version 67+ of [the Datadog Extension][53] is optimized to significantly reduce cold start duration.
732
+
To use the optimized extension, set the `DD_SERVERLESS_APPSEC_ENABLED` environment variable to `false`.
733
+
When the `DD_SERVERLESS_APPSEC_ENABLED` environment variable is set to `true`, the Datadog Extension defaults to the fully compatible older version. You can also force your extension to use the older version by setting `DD_EXTENSION_VERSION` to `compatibility`. Datadog encourages you to report any feedback or bugs by adding an [issue on GitHub][54] and tagging your issue with `version/next`.
734
+
735
+
## Configure Auto-linking for DynamoDB PutItem
736
+
_Available for Python and Node.js runtimes_.
737
+
When segments of your asynchronous requests cannot propagate trace context, Datadog's [Span Auto-linking][55] feature automatically detects linked spans.
738
+
To enable Span Auto-linking for [DynamoDB Change Streams][56]' `PutItem` operation, configure primary key names for your tables.
This enables DynamoDB `PutItem` calls to be instrumented with span pointers. Many DynamoDB API calls do not include the item's primary key fields as separate values, so they need to be provided to the tracer separately. The configuration above is structured as a dictionary (`dict`) or object keyed by the table names as strings (`str`). Each value is the set of primary key field names (as strings) for the associated table. The set can have exactly one or two elements, depending on the table's primary key schema.
773
+
726
774
## Visualize and model AWS services by resource name
727
775
728
776
These versions of the [Node.js][50], [Python][51], and [Java][52] Lambda layers released changes to correctly name, model and visualize AWS managed services.
@@ -801,3 +849,8 @@ If you have trouble configuring your installations, set the environment variable
Instrument your AWS Lambda applications with a Datadog Lambda Library to collect traces, enhanced metrics, and custom metrics.
19
+
20
+
{{< img src="serverless/serverless_tracing_installation_instructions.png" alt="A diagram that shows how Datadog receives telemetry from your instrumented AWS Lambda application. Your Lambda application, instrumented with a Datadog Lambda Library, sends logs, traces, enhanced metrics, and custom metrics to the Datadog Lambda Extension, which then pushes this data to Datadog." style="width:100%;" >}}
21
+
22
+
## Quick start
23
+
24
+
A sample application is [available on GitHub][6] with instructions on how to deploy with multiple runtimes and infrastructure-as-code tools.
25
+
26
+
The quick start process configures your Lambda functions on the fly. To instrument Lambda functions permanently, see the detailed instructions in the next section.
27
+
28
+
## Instrumentation instructions
29
+
30
+
For Node.js and Python runtimes, you can use [remote instrumentation][5] to add instrumentation to your AWS Lambda functions and keep them instrumented securely. See [Remote instrumentation for AWS Lambda][5].
31
+
32
+
For other Lambda runtimes (or to instrument your Node.js or Python functions without remote instrumentation) see detailed instrumentation instructions:
Copy file name to clipboardExpand all lines: content/en/serverless/aws_lambda/instrumentation/dotnet.md
+22-34Lines changed: 22 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
title: Instrumenting .NET Serverless Applications
3
3
aliases:
4
4
- /serverless/installation/dotnet
5
+
- /serverless/aws_lambda/installation/dotnet
5
6
further_reading:
6
7
- link: '/serverless/configuration'
7
8
tag: 'Documentation'
@@ -14,17 +15,11 @@ further_reading:
14
15
text: 'Submitting Custom Metrics from Serverless Applications'
15
16
---
16
17
17
-
<divclass="alert alert-warning">If your Lambda functions are deployed in VPC without access to the public internet, you can send data either <ahref="/agent/guide/private-link/">using AWS PrivateLink</a> for the <code>datadoghq.com</code> <ahref="/getting_started/site/">Datadog site</a>, or <ahref="/agent/configuration/proxy/">using a proxy</a> for all other sites.</div>
18
+
<divclass="alert alert-info">Version 67+ of the Datadog Lambda Extension is optimized to significantly reduce cold start duration. <ahref="/serverless/aws_lambda/configuration/?tab=datadogcli#using-datadog-lambda-extension-v67">Read more</a>.</div>
18
19
19
-
<divclass="alert alert-info">Version 67+ of the Datadog Lambda Extension uses an optimized version of the extension. <ahref="#minimize-cold-start-duration">Read more</a>.</div>
20
+
## Setup
20
21
21
-
<divclass="alert alert-info">For FIPS compliance, use the Datadog FIPS-compliant extension layer, but note that the .NET runtime layer does not require additional configuration. While the FIPS-compliant Lambda components work with any Datadog site, end-to-end FIPS compliance requires using the US1-FED site. See <ahref="/serverless/aws_lambda/fips-compliance">AWS Lambda FIPS Compliance</a> for more details.</div>
22
-
23
-
## Installation
24
-
25
-
<divclass="alert alert-info">A sample application is <ahref="https://github.com/DataDog/serverless-sample-app/tree/main/src/order-service">available on GitHub</a> with instructions on how to deploy with multiple runtimes and infrastructure as code tools.</div>
26
-
27
-
Datadog offers many different ways to enable instrumentation for your serverless applications. Choose a method below that best suits your needs. Datadog generally recommends using the Datadog CLI. You *must* follow the instructions for "Container Image" if your application is deployed as a container image.
22
+
If your application is deployed as a container image, use the _Container Image_ method.
28
23
29
24
{{< tabs >}}
30
25
{{% tab "Datadog CLI" %}}
@@ -304,40 +299,30 @@ module "lambda-datadog" {
304
299
{{% /tab %}}
305
300
{{< /tabs >}}
306
301
307
-
## Minimize cold start duration
308
-
Version 67+ of [the Datadog Extension][7] is optimized to significantly reduce cold start duration.
309
-
310
-
To use the optimized extension, disable App and API Protection (AAP), Continuous Profiler for Lambda, and OpenTelemetry based tracing. Set the following environment variables to `false`:
311
-
312
-
- `DD_TRACE_OTEL_ENABLED`
313
-
- `DD_PROFILING_ENABLED`
314
-
- `DD_SERVERLESS_APPSEC_ENABLED`
315
-
316
-
Enabling any of these features cause the extension to default back to the fully compatible older version of the extension. You can also force your extension to use the older version by setting `DD_EXTENSION_VERSION` to `compatibility`. Datadog encourages you to report any feedback or bugs by adding an [issue on GitHub][8] and tagging your issue with `version/next`.
302
+
## Add custom spans
317
303
318
-
## Adding Custom Spans
319
-
320
-
When using the [Datadog Lambda tracing layer for .NET](https://github.com/DataDog/dd-trace-dotnet-aws-lambda-layer), ensure that a second version of the .NET tracer is not also packaged with your application code. Add `ExcludeAssets` instruction to ensure this extra tracer is excluded.
304
+
When using the [Datadog Lambda tracing layer for .NET][9], ensure that a second version of the .NET tracer is not also packaged with your application code. Add the `ExcludeAssets` instruction to ensure this extra tracer is excluded.
You are now ready to add custom spans and span tags using the .NET tracer. For further instructions on how to add spans, see the [.NET custom instrumentation](https://docs.datadoghq.com/tracing/trace_collection/custom_instrumentation/dotnet/dd-api/) page.
312
+
You can then add custom spans and span tags using the .NET tracer. For instructions on how to add spans, see [.NET custom instrumentation][10].
313
+
314
+
## FIPS compliance
315
+
316
+
{{% svl-lambda-fips %}}
317
+
318
+
## AWS Lambda and VPC
319
+
320
+
{{% svl-lambda-vpc %}}
329
321
330
-
## What's next?
331
-
- View metrics, logs, and traces on the [Serverless page][1] in Datadog. By default, the Datadog Lambda extension enables logs.
332
-
- Turn on [threat monitoring][6] to get alerted on attackers targeting your service.
333
-
- Submit a [custom metric][2] or [APM span][3] to monitor your business logic.
334
-
- See the [troubleshooting guide][4] if you have trouble collecting the telemetry
335
-
- See the [advanced configurations][5] to
336
-
- connect your telemetry using tags
337
-
- collect telemetry for Amazon API Gateway, SQS, and so on.
338
-
- capture the Lambda request and response payloads
339
-
- link errors of your Lambda functions to your source code
340
-
- filter or scrub sensitive information from logs or traces
322
+
- Add custom tags to your telemetry by using the `DD_TAGS` environment variable
323
+
- Configure [payload collection][11] to capture your functions' JSON request and response payloads
324
+
- If you are using the Datadog Lambda Extension, turn off the Datadog Forwarder's Lambda logs
325
+
- See [Configure Serverless Monitoring for AWS Lambda][5] for further capabilities
341
326
342
327
## Further Reading
343
328
@@ -352,3 +337,6 @@ You are now ready to add custom spans and span tags using the .NET tracer. For f
0 commit comments