Skip to content

Commit 3d7aab7

Browse files
authored
Agent-server comm options are not applicable to AWS lambda extension (#403)
* Update monitoring-aws-lambda.asciidoc * Update monitoring-aws-lambda.asciidoc
1 parent 9899932 commit 3d7aab7

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

docs/monitoring-aws-lambda.asciidoc

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,55 +65,63 @@ The configuration options for the APM agents are documented in the corresponding
6565
* {apm-py-ref}/configuration.html[Configuration options - Python APM agent]
6666
* {apm-java-ref}/configuration.html[Configuration options - Java APM agent]
6767

68-
The following configuration options are particularly relevant for the {apm-lambda-ext}:
68+
NOTE: Some APM agent configuration options don't make sense when the APM agent is running in a Lambda environment.
69+
For example, instead of using the Python APM agent configuration variable, `verify_server_cert`, you must use the
70+
`ELASTIC_APM_LAMBDA_VERIFY_SERVER_CERT` varibale described below.
71+
72+
[float]
73+
[[aws-lambda-config-relevant]]
74+
=== Relevant configuraiton options
75+
76+
A list of relevant configuration options for the {apm-lambda-ext} is below.
6977

7078
[float]
7179
[[aws-lambda-extension]]
72-
=== `ELASTIC_APM_LAMBDA_APM_SERVER`
80+
==== `ELASTIC_APM_LAMBDA_APM_SERVER`
7381
This required config option controls where the {apm-lambda-ext} will ship data. This should be the URL of the final APM Server destination for your telemetry.
7482

7583
[float]
76-
=== `ELASTIC_APM_LAMBDA_AGENT_DATA_BUFFER_SIZE`
84+
==== `ELASTIC_APM_LAMBDA_AGENT_DATA_BUFFER_SIZE`
7785
The size of the buffer that stores APM agent data to be forwarded to the APM server. The _default_ is `100`.
7886

7987
[float]
8088
[[aws-lambda-config-authentication-keys]]
81-
=== `ELASTIC_APM_SECRET_TOKEN` or `ELASTIC_APM_API_KEY`
89+
==== `ELASTIC_APM_SECRET_TOKEN` or `ELASTIC_APM_API_KEY`
8290
One of these (or, alternatively, the corresponding settings for the AWS Secrets Manager IDs) needs to be set as the authentication method that the {apm-lambda-ext} uses when sending data to the URL configured via `ELASTIC_APM_LAMBDA_APM_SERVER`. Alternatively, you can store your APM Server credentials <<aws-lambda-secrets-manager, using the AWS Secrets Manager>> and use the <<aws-lambda-config-secrets-manager-options>> config options, instead. Sending data to the APM Server if none of these options is set is possible, but your APM agent must be allowed to send data to your APM server in https://www.elastic.co/guide/en/apm/guide/current/configuration-anonymous.html[anonymous mode].
8391

8492
[float]
8593
[[aws-lambda-config-secrets-manager-options]]
86-
=== `ELASTIC_APM_SECRETS_MANAGER_SECRET_TOKEN_ID` or `ELASTIC_APM_SECRETS_MANAGER_API_KEY_ID`
94+
==== `ELASTIC_APM_SECRETS_MANAGER_SECRET_TOKEN_ID` or `ELASTIC_APM_SECRETS_MANAGER_API_KEY_ID`
8795
Instead of specifying the <<aws-lambda-config-authentication-keys>> as plain text in your Lambda environment variables, you can <<aws-lambda-secrets-manager, use the AWS Secrets Manager>> to securely store your APM authetication keys. The `ELASTIC_APM_SECRETS_MANAGER_API_KEY_ID` or `ELASTIC_APM_SECRETS_MANAGER_SECRET_TOKEN_ID` config options allow you to specify the Secrets Manager's secret id of the stored APM API key or APM secret token, respectively, to be used by the {apm-lambda-ext} for authentication.
8896

8997
`ELASTIC_APM_SECRETS_MANAGER_SECRET_TOKEN_ID` takes precedence over <<aws-lambda-config-authentication-keys, `ELASTIC_APM_SECRET_TOKEN`>>, and `ELASTIC_APM_SECRETS_MANAGER_API_KEY_ID` over <<aws-lambda-config-authentication-keys, `ELASTIC_APM_API_KEY`>>, respectively.
9098

9199
[float]
92-
=== `ELASTIC_APM_SERVICE_NAME`
100+
==== `ELASTIC_APM_SERVICE_NAME`
93101
The configured name of your application or service. The APM agent will use this value when reporting data to the APM Server. If unset, the APM agent will automatically set the value based on the Lambda function name. Use this config option if you want to group multiple Lambda functions under a single service entity in APM.
94102

95103
[float]
96104
[[aws-lambda-config-data-receiver-timeout]]
97-
=== `ELASTIC_APM_DATA_RECEIVER_TIMEOUT`
105+
==== `ELASTIC_APM_DATA_RECEIVER_TIMEOUT`
98106

99107
[small]#Added in: v1.2.0. Replaces `ELASTIC_APM_DATA_RECEIVER_TIMEOUT_SECONDS`.#
100108

101109
The {apm-lambda-ext}'s timeout value, for receiving data from the APM agent. The _default_ is `15s`.
102110

103111
[float]
104-
=== `ELASTIC_APM_DATA_RECEIVER_SERVER_PORT`
112+
==== `ELASTIC_APM_DATA_RECEIVER_SERVER_PORT`
105113
The port on which the {apm-lambda-ext} listens to receive data from the APM agent. The _default_ is `8200`.
106114

107115
[float]
108116
[[aws-lambda-config-data-forwarder-timeout]]
109-
=== `ELASTIC_APM_DATA_FORWARDER_TIMEOUT`
117+
==== `ELASTIC_APM_DATA_FORWARDER_TIMEOUT`
110118

111119
[small]#Added in: v1.2.0. Replaces `ELASTIC_APM_DATA_FORWARDER_TIMEOUT_SECONDS`.#
112120

113121
The timeout value, for the {apm-lambda-ext}'s HTTP client sending data to the APM Server. The _default_ is `3s`. If the extension's attempt to send APM data during this time interval is not successful, the extension queues back the data. Further attempts at sending the data are governed by an exponential backoff algorithm: data will be sent after a increasingly large grace period of 0, then circa 1, 4, 9, 16, 25 and 36 seconds, provided that the Lambda function execution is ongoing.
114122

115123
[float]
116-
=== `ELASTIC_APM_SEND_STRATEGY`
124+
==== `ELASTIC_APM_SEND_STRATEGY`
117125
Whether to synchronously flush APM agent data from the {apm-lambda-ext} to the APM Server at the end of the function invocation.
118126
The two accepted values are `background` and `syncflush`. The _default_ is `syncflush`.
119127

@@ -129,39 +137,39 @@ the next request until the extension has flushed all the data. This has a negati
129137
though it ensures that all APM data is sent to the APM server.
130138

131139
[float]
132-
=== `ELASTIC_APM_LOG_LEVEL`
140+
==== `ELASTIC_APM_LOG_LEVEL`
133141
The logging level to be used by both the APM Agent and the {apm-lambda-ext}. Supported values are `trace`, `debug`, `info`, `warning`, `error`, `critical` and `off`.
134142

135143
[float]
136-
=== `ELASTIC_APM_LAMBDA_CAPTURE_LOGS`
144+
==== `ELASTIC_APM_LAMBDA_CAPTURE_LOGS`
137145

138146
preview:[]
139147
Starting in Elastic Stack version 8.5.0, the Elastic APM lambda extension supports the collection of log events by default.
140148
Log events can be viewed in {kib} in the APM UI. Disable log collection by setting this to `false`.
141149

142150
[float]
143-
=== `ELASTIC_APM_LAMBDA_VERIFY_SERVER_CERT`
151+
==== `ELASTIC_APM_LAMBDA_VERIFY_SERVER_CERT`
144152

145153
[small]#Added in: v1.3.0.#
146154

147155
Whether to enable {apm-lambda-ext} to verify APM Server's certificate chain and host name.
148156

149157
[float]
150-
=== `ELASTIC_APM_LAMBDA_SERVER_CA_CERT_PEM`
158+
==== `ELASTIC_APM_LAMBDA_SERVER_CA_CERT_PEM`
151159

152160
[small]#Added in: v1.3.0.#
153161

154162
The certificate passed as environment variable. To be used to verify APM Server's certificate chain if verify server certificate is enabled.
155163

156164
[float]
157-
=== `ELASTIC_APM_SERVER_CA_CERT_FILE`
165+
==== `ELASTIC_APM_SERVER_CA_CERT_FILE`
158166

159167
[small]#Added in: v1.3.0.#
160168

161169
The certificate passed as a file name available to the extension. To be used to verify APM Server's certificate chain if verify server certificate is enabled.
162170

163171
[float]
164-
=== `ELASTIC_APM_SERVER_CA_CERT_ACM_ID`
172+
==== `ELASTIC_APM_SERVER_CA_CERT_ACM_ID`
165173

166174
[small]#Added in: v1.3.0.#
167175

0 commit comments

Comments
 (0)