跳转至

AWS Lambda 扩展


Version-1.34.0 · Experimental

AWS Lambda 采集器是通过 AWS Lambda Extension 的方式采集 AWS Lambda 的指标与日志。

安装

添加 DataKit 层

  • 通过 Zip 创建层

    • zip 下载地址:

    • 打开 Lambda 控制台的 Layers page(层页面)。

    • 选择 Create layer(创建层)。
    • Layer configuration(层配置)下,在 Name(名称)中,输入层的名称。
    • 请选择 Upload a .zip file(上传 .zip 文件)。然后,选择 Upload(上载)以选择本地 .zip 文件。
    • 选择 Create(创建)。
  • 通过 ARN 添加层

    • 打开 Lambda 控制台的函数页面
    • 选择要配置的函数。
    • 下,选择添加层
    • 选择层下,选择 ARN 层源。
    • 请在文本框中输入 ARN 并选择验证。然后,选择添加

配置所需的环境变量

  • ENV_DATAWAY=https://openway.guance.com?token=<your-token>

指标

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

awslambda

Tags & Fields Description
base_service
(tag)
Span base service name
container_host
(tag)
Container hostname. Available in OpenTelemetry. Optional.
db_host
(tag)
DB host name: ip or domain name. Optional.
db_name
(tag)
Database name. Optional.
db_system
(tag)
Database system name:mysql,oracle... Optional.
dk_fingerprint
(tag)
DataKit fingerprint(always DataKit's hostname)
endpoint
(tag)
Endpoint info. Available in SkyWalking, Zipkin. Optional.
env
(tag)
Application environment info. Available in Jaeger. Optional.
host
(tag)
Hostname.
http_method
(tag)
HTTP request method name. Available in DDTrace, OpenTelemetry. Optional.
http_route
(tag)
HTTP route. Optional.
http_status_code
(tag)
HTTP response code. Available in DDTrace, OpenTelemetry. Optional.
http_url
(tag)
HTTP URL. Optional.
operation
(tag)
Span name
out_host
(tag)
This is the database host, equivalent to db_host,only DDTrace-go. Optional.
project
(tag)
Project name. Available in Jaeger. Optional.
service
(tag)
Service name. Optional.
source_type
(tag)
Tracing source type
span_type
(tag)
Span type
status
(tag)
Span status
version
(tag)
Application version info. Available in Jaeger. Optional.
duration Duration of span
Type: int | (gauge)
Unit: time,μs
message Origin content of span
Type: string
Unit: N/A
parent_id Parent span ID of current span
Type: string
Unit: N/A
resource Resource name produce current span
Type: string
Unit: N/A
span_id Span id
Type: string
Unit: N/A
start start time of span.
Type: int | (gauge)
Unit: timeStamp,usec
trace_id Trace id
Type: string
Unit: N/A

采集器支持

  • OpenTelemetry
  • statsd
  • ddtrace # 目前只支持 golang。由于 ddtrace 在 lambda 环境下会有特殊操作,需要添加 tracer.WithLambdaMode(false)

文档评价

文档内容是否对您有帮助? ×