Skip to content

Commit 1553137

Browse files
committed
add documentation around LAMBDA_XRAY_INIT
1 parent 5e0fa29 commit 1553137

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Diff for: content/en/aws/xray-tracing/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ def lambda_handler(event, context):
2525
```
2626

2727
Running this code in Lambda on LocalStack will result in two trace segments being created in XRay - one from the instrumented `boto3` client when running `create_bucket(..)`, and one for the custom subsegment denoted `'my_code'`. You can use the regular XRay API calls (e.g., [`GetTraceSummaries`](https://docs.aws.amazon.com/xray/latest/api/API_GetTraceSummaries.html), [`BatchGetTraces`](https://docs.aws.amazon.com/xray/latest/api/API_BatchGetTraces.html)) to retrieve the details (timestamps, IDs, etc) of these segments.
28+
29+
{{< alert >}}
30+
**Note:** To use XRay in Lambdas, please note that you'll need to configure `LAMBDA_XRAY_INIT=1` - this will ensure that the XRay daemon process is fully initialized when spawning Lambda containers (may slightly increase startup times).
31+
{{< /alert >}}

Diff for: content/en/localstack/configuration.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ This section covers configuration values that are specific to AWS services.
7272
| `DYNAMODB_DELAY_TRANSIENT_STATUSES` | `0`\|`1` | When activated, DynamoDB will introduce artificial delays in resource creation to simulate the actual cloud service more closely. Currently works only for CREATING and DELETING online index statuses. |
7373
| `DYNAMODB_CORS` | `*` | Enable CORS support for specific allow-list list the domains separated by `,` use `*` for public access (default is `*`) |
7474

75-
7675
### Elasticsearch
7776

7877
| Variable | Example Values | Description |
@@ -81,7 +80,6 @@ This section covers configuration values that are specific to AWS services.
8180
| `ES_MULTI_CLUSTER` | `0`\|`1` | When activated, LocalStack will spawn one Elasticsearch cluster per domain. Otherwise all domains will share a single cluster instance. This is ignored if `ES_CUSTOM_BACKEND` is set. |
8281
| `ES_ENDPOINT_STRATEGY` | `path`\|`domain`\|`off` | Governs how domain endpoints are created to access a cluster (see [Elasticsearch#endpoints]({{< ref "elasticsearch#endpoints" >}})) |
8382

84-
8583
### Kinesis
8684

8785
| Variable | Example Values | Description |
@@ -109,11 +107,12 @@ This section covers configuration values that are specific to AWS services.
109107
| `LAMBDA_DOCKER_DNS` | | Optional DNS server for the container running your lambda function. |
110108
| `LAMBDA_DOCKER_FLAGS` | `-e KEY=VALUE`, `-v host:container`, `-p host:container`, `--add-host domain:ip` | Additional flags passed to Lambda Docker `run`\|`create` commands (e.g., useful for specifying custom volume mounts). Does only support environment, volume, port and add-host flags |
111109
| `LAMBDA_CONTAINER_REGISTRY` | `lambci/lambda` (default) | An alternative docker registry from where to pull lambda execution containers.|
112-
| `LAMBDA_REMOVE_CONTAINERS` | `true` (default) | Whether to remove containers after Lambdas finished executing.|
110+
| `LAMBDA_REMOVE_CONTAINERS` | `1` (default) | Whether to remove containers after Lambdas finished executing.|
113111
| `LAMBDA_FALLBACK_URL` | | Fallback URL to use when a non-existing Lambda is invoked. Either records invocations in DynamoDB (value `dynamodb://<table_name>`) or forwards invocations as a POST request (value `http(s)://...`).|
114112
| `LAMBDA_FORWARD_URL` | | URL used to forward all Lambda invocations (useful to run Lambdas via an external service).
115113
| `LAMBDA_JAVA_OPTS` | `-Xmx512M` | Allow passing custom JVM options to Java Lambdas executed in Docker. Use `_debug_port_` placeholder to configure the debug port, e.g., `-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=_debug_port_`. |
116114
| `HOSTNAME_FROM_LAMBDA` | `localstack` | Endpoint host under which APIs are accessible from Lambda containers (optional). This can be useful in docker-compose stacks to use the local container hostname if neither IP address nor container name of the main container are available (e.g., in CI). Often used in combination with `LAMBDA_DOCKER_NETWORK`. |
115+
| `LAMBDA_XRAY_INIT` | `1` / `0` (default) | Whether to fully initialize XRay daemon for Lambda containers (may increase Lambda startup times) |
117116

118117
### Stepfunction
119118

0 commit comments

Comments
 (0)