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
Copy file name to clipboardExpand all lines: content/en/serverless/installation/_index.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,9 @@ Install the [AWS integration][1]. This allows Datadog to ingest Lambda metrics f
16
16
17
17
### 2. Install the Datadog Forwarder
18
18
19
-
Install the [Datadog Forwarder Lambda function][2], which is required for ingestion of AWS Lambda traces, enhanced metrics, custom metrics, and logs. **Note**: Skip this step if you already have the Forwarder function installed as part of the [AWS integration][1] CloudFormation stack.
19
+
Install the [Datadog Forwarder Lambda function][2], which is required to ingest AWS Lambda traces, enhanced metrics, custom metrics, and logs.
20
+
21
+
**Note**: Skip this step if you already have the Forwarder function installed as part of the [AWS integration][1] CloudFormation Stack.
[Enable custom metric submission][3] to get started.
284
+
285
+
### Enable the AWS X-Ray Integration
286
+
287
+
Datadog’s integration with AWS X-Ray allows you to visualize end-to-end serverless transactions, so you can zero in on the source of any errors or slowdowns, and see how the performance of your functions impacts your users’ experience. Depending on your language and configuration, [choose between setting up Datadog APM or the AWS X-Ray integration][4] for your tracing needs.
288
+
289
+
{{< img src="integrations/amazon_lambda/lambda_tracing.png" alt="Architecture diagram for tracing AWS Lambda with Datadog" >}}
Install `datadog-lambda` and its dependencies locally to your function project folder. **Note**: `datadog-lambda`depends on `ddtrace`, which uses native extensions; therefore they must be installed and compiled in a Linux environment. For example, you can use [dockerizePip][8] for the Serverless Framework and [--use-container][9] for AWS SAM. For more details, see [how to add dependencies to your function deployment package][3].
248
+
Install `datadog-lambda` and its dependencies locally to your function project folder. **Note**: `datadog-lambda`depends on `ddtrace`, which uses native extensions; therefore they must be installed and compiled in a Linux environment. For example, you can use [dockerizePip][3] for the Serverless Framework and [--use-container][4] for AWS SAM. For more details, see [how to add dependencies to your function deployment package][5].
249
249
250
250
```
251
251
pip install datadog-lambda -t ./
252
252
```
253
253
254
-
See the [latest release][4].
254
+
See the [latest release][6].
255
255
256
256
### Configure the Function
257
257
@@ -265,27 +265,29 @@ See the [latest release][4].
265
265
266
266
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.
267
267
268
-
1. [Install the Datadog Forwarder][5] if you haven't.
269
-
2. [Ensure the option DdFetchLambdaTags is enabled][6].
270
-
3. [Subscribe the Datadog Forwarder to your function's log groups][7].
268
+
1. [Install the Datadog Forwarder][7] if you haven't.
269
+
2. [Ensure the option DdFetchLambdaTags is enabled][8].
270
+
3. [Subscribe the Datadog Forwarder to your function's log groups][9].
After you have configured your function following the steps above, you can view metrics, logs and traces on the [Serverless Homepage][3].
288
288
289
+
### Monitor Custom Business Metrics
290
+
289
291
If you would like to submit a custom metric or manually instrument a function, see the sample code below:
290
292
291
293
```python
@@ -310,6 +312,16 @@ def get_message():
310
312
return "Hello from serverless!"
311
313
```
312
314
315
+
[Enable custom metric submission][3] to get started.
316
+
317
+
### Enable the AWS X-Ray Integration
318
+
319
+
Datadog’s integration with AWS X-Ray allows you to visualize end-to-end serverless transactions, so you can zero in on the source of any errors or slowdowns, and see how the performance of your functions impacts your users’ experience. Depending on your language and configuration, [choose between setting up Datadog APM or the AWS X-Ray integration][5] for your tracing needs.
320
+
321
+
{{< img src="integrations/amazon_lambda/lambda_tracing.png" alt="Architecture diagram for tracing AWS Lambda with Datadog" >}}
Copy file name to clipboardExpand all lines: content/en/serverless/installation/ruby.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,8 @@ You need to subscribe the Datadog Forwarder Lambda function to each of your func
61
61
62
62
After you have configured your function following the steps above, you should be able to view metrics, logs and traces on the [Serverless Homepage][8].
63
63
64
+
### Monitor Custom Business Metrics
65
+
64
66
If you would like to submit a custom metric or manually instrument a function, see the sample code below:
65
67
66
68
```ruby
@@ -92,7 +94,13 @@ def some_operation()
92
94
end
93
95
end
94
96
```
97
+
[Enable custom metric submission][3] to get started.
98
+
99
+
### Enable the AWS X-Ray Integration
100
+
101
+
Datadog’s integration with AWS X-Ray allows you to visualize end-to-end serverless transactions, so you can zero in on the source of any errors or slowdowns, and see how the performance of your functions impacts your users’ experience. Depending on your language and configuration, [choose between setting up Datadog APM or the AWS X-Ray integration][5] for your tracing needs.
95
102
103
+
{{< img src="integrations/amazon_lambda/lambda_tracing.png" alt="Architecture diagram for tracing AWS Lambda with Datadog" >}}
Copy file name to clipboardExpand all lines: content/en/tracing/serverless_functions/_index.md
+5-38Lines changed: 5 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,47 +20,20 @@ Depending on your language and configuration, choose between setting up Datadog
20
20
| Set up using your developer tools without making any changes to your code with Serverless Framework and AWS SAM Integrations. | Install the AWS X-Ray client library for your Lambda runtime. |
21
21
| Support for Python, Node.js, Ruby. | Support for all Lambda runtimes. |
22
22
23
-
24
-
## Organizing your Serverless infrastructure with tags
25
-
26
-
Any [tag][3] applied to your AWS Lambda function automatically becomes a new dimension on which you can slice and dice your traces.
27
-
28
-
Tags are especially powerful for consistency across the Datadog platform, which has [first-class support][4] for the `env` and `service` tags.
29
-
30
-
**Note**: If you are tracing with Datadog APM, set the parameter `DdFetchLambdaTags` to `true` on the forwarder CloudFormation stack to ensure your traces are tagged with the resource tags on the originating Lambda function. Lambda function resource tags are automatically surfaced to X-Ray traces in Datadog without any additional configuration.
31
-
32
-
### The env tag
33
-
34
-
Use `env` to separate out your staging, development, and production environments. This works for any kind of infrastructure, not just for your serverless functions. As an example, you could tag your production EU Lambda functions with `env:prod-eu`.
35
-
36
-
By default, AWS Lambda functions are tagged with `env:none` in Datadog. Add your own tag to override this.
37
-
38
-
### The service tag
39
-
40
-
Add the `service`[tag][5] in order to group related Lambda functions into a [service][6]. The [Service Map][5] and [Services List][7] use this tag to show relationships between services and the health of their monitors. Services are represented as individual nodes on the Service Map.
41
-
42
-
By default, each Lambda function is treated as its own `service`. Add your own tag to override this.
43
-
44
-
**Note**: The default behavior for new Datadog customers is for all Lambda functions to be grouped under the `aws.lambda` service, and represented as a single node on the Service map. Tag your functions by `service` to override this.
45
-
46
-
{{< img src="integrations/amazon_lambda/animated_service_map.gif" alt="animated service map of Lambda functions" >}}
47
-
48
23
## Augment AWS X-Ray Tracing with Datadog APM
49
24
50
25
{{< img src="integrations/amazon_lambda/lambda_tracing.png" alt="Architecture diagram for tracing AWS Lambda with Datadog" >}}
51
26
52
-
You might also configure _both_ AWS X-Ray Tracing and Datadog APM, which can be useful, but will result in higher usage bills. If you are unsure whether to use Datadog APM or AWS X-Ray, contact [our support team][8] to discuss.
53
-
54
-
You can find setup instructions for this case when you want to do both below:
27
+
You might also configure _both_ AWS X-Ray Tracing and Datadog APM. Note that this may result in higher usage bills. You can find setup instructions for this case when you want to do both below:
55
28
56
29
-[Tracing in a serverless-first environment](#tracing-in-a-serverless-first-environment)
57
30
-[Tracing across AWS Lambda and hosts](#tracing-across-aws-lambda-and-hosts)
58
31
59
32
#### Tracing in a serverless-first environment
60
33
61
-
AWS X-Ray is both a backend AWS service and a set of client libraries. The service gives you an Invocation span for your AWS Lambda functions and traces across Amazon API Gateways and message queues.
34
+
AWS X-Ray provides both a backend AWS service and a set of client libraries. Enabling the backend AWS service alone gives you an Invocation span for your AWS Lambda functions as well as traces across Amazon API Gateways and message queues.
62
35
63
-
The client libraries trace the integrations in your code. If you are using the Datadog APM client library instead of the AWS X-Ray client library to trace and visualize traces, follow the below two steps:
36
+
Both the AWS X-Ray and Datadog APM client libraries trace the integrations in your code. If you are using the Datadog APM client library instead of the AWS X-Ray client library to trace and visualize traces, follow the below two steps:
64
37
65
38
1. Enable the [AWS X-Ray integration][2] for tracing your Lambda functions.
66
39
2.[Set up Datadog APM][1] on your Lambda functions.
@@ -103,7 +76,7 @@ Set the `DD_MERGE_DATADOG_XRAY_TRACES` environment variable to `True` on your La
103
76
When applicable, Datadog merges AWS X-Ray traces with native Datadog APM traces. This means that your traces will show the complete picture of requests that cross infrastructure boundaries, whether it be AWS Lambda, containers, on-prem hosts, or managed services.
104
77
105
78
1. Enable the [AWS X-Ray integration][2] for tracing your Lambda functions.
106
-
2.[Set up Datadog APM][9] on your hosts and container-based infrastructure.
79
+
2.[Set up Datadog APM][3] on your hosts and container-based infrastructure.
107
80
108
81
**Note**: Distributed Tracing is supported for any runtime for your host or container-based applications.
109
82
@@ -117,10 +90,4 @@ When applicable, Datadog merges AWS X-Ray traces with native Datadog APM traces.
0 commit comments