Skip to content

Commit a1fcecf

Browse files
committed
add observer lamda functions
1 parent 531d95f commit a1fcecf

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

solutions/observability/apps/observe-lambda-functions.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,44 @@ mapped_urls:
44
- https://www.elastic.co/guide/en/serverless/current/observability-apm-observe-lambda-functions.html
55
---
66

7-
# Observe Lambda functions
7+
# Observe Lambda functions [apm-lambda]
88

9-
% What needs to be done: Align serverless/stateful
9+
Elastic APM provides performance and error monitoring for AWS Lambda functions. See how your Lambda functions relate to and depend on other services, and get insight into function execution and runtime behavior, like lambda duration, cold start rate, cold start duration, compute usage, memory usage, and more.
1010

11-
% Use migrated content from existing pages that map to this page:
11+
To set up Lambda monitoring, refer to [AWS Lambda functions](/solutions/observability/apps/monitoring-aws-lambda-functions.md).
1212

13-
% - [ ] ./raw-migrated-files/observability-docs/observability/apm-lambda.md
14-
% - [ ] ./raw-migrated-files/docs-content/serverless/observability-apm-observe-lambda-functions.md
13+
:::{image} ../../../images/observability-lambda-overview.png
14+
:alt: lambda overview
15+
:class: screenshot
16+
:::
1517

16-
% Internal links rely on the following IDs being on this page (e.g. as a heading ID, paragraph ID, etc):
1718

18-
$$$apm-lambda-cold-start-info$$$
19+
## Cold starts [apm-lambda-cold-start-info]
1920

20-
$$$observability-apm-observe-lambda-functions-cold-starts$$$
21+
A cold start occurs when a Lambda function has not been used for a certain period of time. A lambda worker receives a request to run the function and prepares an execution environment.
22+
23+
Cold starts are an unavoidable byproduct of the serverless world, but visibility into how they impact your services can help you make better decisions about factors like how much memory to allocate to a function, whether to enable provisioned concurrency, or if it’s time to consider removing a large dependency.
24+
25+
26+
### Cold start rate [apm-lambda-cold-start-rate]
27+
28+
The cold start rate (i.e. proportion of requests that experience a cold start) is displayed per service and per transaction.
29+
30+
Cold start is also displayed in the trace waterfall, where you can drill-down into individual traces and see trace metadata like AWS request ID, trigger type, and trigger request ID.
31+
32+
33+
### Latency distribution correlation [apm-lambda-cold-start-latency]
34+
35+
The [latency correlations](../../../solutions/observability/apps/find-transaction-latency-failure-correlations.md#observability-apm-find-transaction-latency-and-failure-correlations) feature can be used to visualize the impact of Lambda cold starts on latency—​just select the `faas.coldstart` field.
36+
37+
:::{image} ../../../images/observability-lambda-correlations.png
38+
:alt: lambda correlations example
39+
:class: screenshot
40+
:::
41+
42+
43+
## AWS Lambda function grouping [apm-lambda-service-config]
44+
45+
The default APM agent configuration results in one APM service per AWS Lambda function, where the Lambda function name is the service name.
46+
47+
In some use cases, it makes more sense to logically group multiple lambda functions under a single APM service. You can achieve this by setting the `ELASTIC_APM_SERVICE_NAME` environment variable on related Lambda functions to the same value.

0 commit comments

Comments
 (0)