Skip to content

Commit 153fdd8

Browse files
Correct links to Lambda extension docs (#1671)
* Correct links to Lambda extension docs * Added `background` as the default send strategy * description for background strategy
1 parent fc7064f commit 153fdd8

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

docs/lambda/configure-lambda.asciidoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ To configure APM through the AWS Management Console:
1111
----
1212
ELASTIC_APM_LAMBDA_APM_SERVER = <YOUR-APM-SERVER-URL> # this is your APM Server URL
1313
ELASTIC_APM_SECRET_TOKEN = <YOUR-APM-SECRET-TOKEN> # this is your APM secret token
14+
ELASTIC_APM_SEND_STRATEGY = background <1>
1415
----
1516

1617
--
@@ -26,7 +27,7 @@ To configure APM through the AWS command line interface execute the following co
2627
[source,bash]
2728
----
2829
aws lambda update-function-configuration --function-name yourLambdaFunctionName \
29-
--environment "Variables={ELASTIC_APM_LAMBDA_APM_SERVER=<YOUR-APM-SERVER-URL>,ELASTIC_APM_SECRET_TOKEN=<YOUR-APM-SECRET-TOKEN>}"
30+
--environment "Variables={ELASTIC_APM_LAMBDA_APM_SERVER=<YOUR-APM-SERVER-URL>,ELASTIC_APM_SECRET_TOKEN=<YOUR-APM-SECRET-TOKEN>,ELASTIC_APM_SEND_STRATEGY=background}" <1>
3031
----
3132

3233
// end::cli-extension-only[]
@@ -47,6 +48,7 @@ Resources:
4748
Variables:
4849
ELASTIC_APM_LAMBDA_APM_SERVER: <YOUR-APM-SERVER-URL>
4950
ELASTIC_APM_SECRET_TOKEN: <YOUR-APM-SECRET-TOKEN>
51+
ELASTIC_APM_SEND_STRATEGY: background <1>
5052
...
5153
----
5254

@@ -65,6 +67,7 @@ functions:
6567
environment:
6668
ELASTIC_APM_LAMBDA_APM_SERVER: <YOUR-APM-SERVER-URL>
6769
ELASTIC_APM_SECRET_TOKEN: <YOUR-APM-SECRET-TOKEN>
70+
ELASTIC_APM_SEND_STRATEGY: background <1>
6871
...
6972
----
7073

@@ -82,6 +85,7 @@ resource "aws_lambda_function" "your_lambda_function" {
8285
variables = {
8386
ELASTIC_APM_LAMBDA_APM_SERVER = "<YOUR-APM-SERVER-URL>"
8487
ELASTIC_APM_SECRET_TOKEN = "<YOUR-APM-SECRET-TOKEN>"
88+
ELASTIC_APM_SEND_STRATEGY = "background" <1>
8589
}
8690
}
8791
}
@@ -98,6 +102,7 @@ You can use one of the other options (through AWS Web Console, AWS CLI, etc.) to
98102
----
99103
ELASTIC_APM_LAMBDA_APM_SERVER = <YOUR-APM-SERVER-URL> # this is your APM Server URL
100104
ELASTIC_APM_SECRET_TOKEN = <YOUR-APM-SECRET-TOKEN> # this is your APM secret token
105+
ELASTIC_APM_SEND_STRATEGY = background <1>
101106
----
102107

103108
// end::container-extension-only[]

docs/serverless.asciidoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You need an APM Server to send APM data to. Follow the {apm-guide-ref}/apm-quick
1616

1717
include::{apm-aws-lambda-root}/docs/lambda-selector/lambda-attributes-selector.asciidoc[]
1818

19-
Add the {apm-guide-ref}/aws-lambda-arch.html[{apm-lambda-ext}] as an https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html[AWS Lambda Layer] to your AWS Lambda function.
19+
Add the {apm-lambda-ref}/aws-lambda-arch.html[{apm-lambda-ext}] as an https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html[AWS Lambda Layer] to your AWS Lambda function.
2020

2121
include::{apm-aws-lambda-root}/docs/lambda-selector/extension-arn-replacement.asciidoc[]
2222
include::{apm-aws-lambda-root}/docs/add-extension/add-extension-layer-widget.asciidoc[]
@@ -54,11 +54,12 @@ The {apm-lambda-ext} and the APM Python agent are configured through environment
5454
For the minimal configuration, you will need the _APM Server URL_ to set the destination for APM data and an _{apm-guide-ref}/secret-token.html[APM Secret Token]_.
5555
If you prefer to use an {apm-guide-ref}/api-key.html[APM API key] instead of the APM secret token, use the `ELASTIC_APM_API_KEY` environment variable instead of `ELASTIC_APM_SECRET_TOKEN` in the following configuration.
5656

57-
For production environments, we recommend {apm-guide-ref}/aws-lambda-secrets-manager.html[using the AWS Secrets Manager to store your APM authentication key] instead of providing the secret value as plaintext in the environment variables.
57+
For production environments, we recommend {apm-lambda-ref}/aws-lambda-secrets-manager.html[using the AWS Secrets Manager to store your APM authentication key] instead of providing the secret value as plaintext in the environment variables.
5858

5959
include::./lambda/configure-lambda-widget.asciidoc[]
60+
<1> The {apm-lambda-ref}/aws-lambda-config-options.html#_elastic_apm_send_strategy[`ELASTIC_APM_SEND_STRATEGY`] defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the `background` strategy in production environments with steady load scenarios.
6061

61-
You can optionally <<configuration,fine-tune the Python agent>> or the {apm-guide-ref}/aws-lambda-config-options.html[configuration of the {apm-lambda-ext}].
62+
You can optionally <<configuration,fine-tune the Python agent>> or the {apm-lambda-ref}/aws-lambda-config-options.html[configuration of the {apm-lambda-ext}].
6263

6364
That's it; Once the agent is installed and working, spans will be captured for
6465
<<supported-technologies,supported technologies>>. You can also use

0 commit comments

Comments
 (0)