AWS Lambda Extension
The AWS Lambda collector collects AWS Lambda metrics and logs through the Lambda extension.
Installation¶
Adding a DataKit Layer¶
-
-
Zip download links:
-
Open the Lambda console Layers page.
- Select Create layer.
- Under Layer configuration, enter the layer name in Name.
- Choose Upload a .zip file. Then, select Upload to choose the local .zip file.
- Select Create.
-
-
- Open the Lambda console Functions page.
- Select the function you want to configure.
- Under Layers, select Add Layer.
- Under Select a layer, choose ARN as the layer source.
- Enter the ARN in the text box, select Verify, and then choose Add.
Configure the Required Environment Variables¶
- ENV_DATAWAY=
https://openway.truewatch.com?token=<your-token>
Metrics¶
awslambda-metric¶
| Tags & Fields | Description |
|---|---|
| aws_account_id ( tag) |
AWS Account ID. |
| aws_lambda_function_memory_size ( tag) |
Configured memory size for the Lambda function. |
| aws_lambda_function_name ( tag) |
Lambda function name. |
| aws_lambda_function_version ( tag) |
Lambda function version. |
| aws_lambda_initialization_type ( tag) |
Initialization type of the Lambda function. |
| aws_region ( tag) |
AWS region where the function is executed. |
| billed_duration_ms | Billed duration in milliseconds. Type: int | (histogram) Unit: time,ms |
| duration_ms | Total duration in milliseconds. Type: int | (histogram) Unit: time,ms |
| errors | Errors count. Type: int | (histogram) Unit: count |
| init_duration_ms | Initialization duration in milliseconds. Type: int | (histogram) Unit: time,ms |
| invocations | Invocation count. Type: int | (histogram) Unit: count |
| max_memory_used_mb | Maximum memory used in MB. Type: int | (histogram) Unit: digital,Mb |
| memory_size_mb | Memory size configured for the Lambda function in MB. Type: int | (histogram) Unit: digital,Mb |
| out_of_memory | Out of memory errors count. Type: int | (histogram) Unit: count |
| post_runtime_duration | Duration of the post-runtime phase in milliseconds. Type: int | (histogram) Unit: time,ms |
| produced_bytes | Bytes produced. Type: int | (histogram) Unit: digital,B |
| response_duration_ms | Response duration in milliseconds. Type: int | (histogram) Unit: time,ms |
| response_latency | Response latency in milliseconds. Type: int | (histogram) Unit: time,ms |
| runtime_duration_ms | Duration of the runtime in milliseconds. Type: int | (histogram) Unit: time,ms |
| timeouts | Timeouts count. Type: int | (histogram) Unit: count |
awslambda-logging¶
| Tags & Fields | Description |
|---|---|
| aws_log_from ( tag) |
log sources, currently only function are supported |
| message | Log message. Type: string Unit: N/A |
Collector Support¶
- OpenTelemetry
- statsd
- ddtrace # Currently, only Go is supported. Due to special operations required by ddtrace in the lambda environment, you need to add
tracer.WithLambdaMode(false).