|
2 | 2 |
|
3 | 3 | An extension for capturing observability data from AWS Lambda invocations and shipping to Dash0. |
4 | 4 |
|
5 | | -This extension has four main functionalities: |
| 5 | +## Table of Contents |
| 6 | + |
| 7 | +- [Layer ARNs](#layer-arns) |
| 8 | +- [Configuration](#configuration) |
| 9 | + - [Required](#required) |
| 10 | + - [Optional](#optional) |
| 11 | + - [Secret Masking](#secret-masking) |
| 12 | +- [Manual Instrumentation](#manual-instrumentation) |
| 13 | +- [Enrichment Attributes](#enrichment-attributes) |
| 14 | + - [Span Attributes](#span-attributes) |
| 15 | + - [Log Attributes](#log-attributes) |
| 16 | + - [Metrics](#metrics) |
| 17 | +- [Dockerized Lambdas](#dockerized-lambdas) |
| 18 | + |
| 19 | +This extension has five main functionalities: |
6 | 20 | 1. Enable auto-instrumentation for supported runtimes, which currently include Python, Node, Java. |
7 | 21 | 2. Receive traces from auto/manual instrumentations, enrich with data acquired in the extension, and send to Dash0. |
8 | 22 | 3. Detect runtime errors such as timeout or out of memory and create synthetic traces for them |
9 | 23 | 4. Collect all logs and send to Dash0, correlated with the trace id of the invocation. |
| 24 | +5. Create metrics for invocation duration, cold start duration, billed duration, and memory used. |
10 | 25 |
|
11 | 26 |
|
12 | 27 | ## Layer ARNs |
@@ -42,8 +57,6 @@ See the release page for the latest ARNs of the extension layers for each runtim |
42 | 57 |
|
43 | 58 | * `DASH0_REQUEST_TIMEOUT` - Timeout in milliseconds for HTTP requests to the backend. Default: `2000`. |
44 | 59 |
|
45 | | -* `DASH0_MAX_EVENT_PAYLOAD` - Maximum size in KB for event payloads (request/response bodies) captured in traces. Payloads exceeding this limit are truncated. Default: `20`. |
46 | | - |
47 | 60 | * `DASH0_CREATE_PAYLOAD_LOG_RECORDS` - When set to `true` (the default), the extension creates log records containing the request and response payloads for the lambda invocation and each client call. Set to `false` to disable. Default: `true`. |
48 | 61 |
|
49 | 62 | * `DASH0_DISABLE_TELEMETRY_LOG_COLLECTION` - When set to `true`, disables collecting logs from the [Lambda Telemetry API](https://docs.aws.amazon.com/lambda/latest/dg/telemetry-api.html). Default: `false`. |
@@ -102,6 +115,16 @@ The following environment variables allow fine-grained control over secret maski |
102 | 115 | Example: `DASH0_MASK_QUERY_PARAMS='[".*api_key.*", ".*token.*"]'` |
103 | 116 |
|
104 | 117 |
|
| 118 | +## Manual Instrumentation |
| 119 | + |
| 120 | +If you prefer to set up OpenTelemetry instrumentation yourself instead of relying on the extension's auto-instrumentation, you can use the manual layer and point your OTLP exporters to the extension's local endpoint. The extension will receive the telemetry, enrich it, and forward it to Dash0. |
| 121 | + |
| 122 | +1. Add the manual layer to your Lambda function: `arn:aws:lambda:<region>:115813213817:layer:dash0-extension-manual:<version>`. |
| 123 | +2. Configure your OTLP trace exporter to send to `http://127.0.0.1:9009/v1/traces`. |
| 124 | +3. If exporting metrics, configure your OTLP metric exporter to send to `http://127.0.0.1:9009/v1/metrics`. |
| 125 | +4. Make sure to flush all telemetry before the Lambda invocation completes (e.g., in a response hook or before returning the response). |
| 126 | + |
| 127 | + |
105 | 128 | ## Enrichment Attributes |
106 | 129 |
|
107 | 130 | The extension enriches telemetry data with additional attributes beyond what the auto-instrumentation provides. |
|
0 commit comments