AWS 람다

이 페이지는 Amazon 클라우드와치(CloudWatch)에서 AWS 람다 메트릭 수집을 위한 설명서로 제한됩니다. 실시간으로 람다 함수에서 직접 텔레메트리를 수집하기 위한 Datadog 서버리스 설명서를 참조하세요 .

개요

AWS 람다는 이벤트에 대응하기 위한 코드를 실행하고 자동으로 해당 코드에서 필요로 하는 컴퓨팅 리소스를 관리하는 컴퓨팅 서비스입니다.

클라우드와치(CloudWatch) 수집을 시작하려면 이 통합을 활성화하세요. 또한, 이 페이지에서 람다 함수를 위한 커스텀 메트릭, 로깅 및 추적을 설정하는 방법을 설명하세요.

설정

설치

이미 하지 않은 경우 먼저 Amazon Web Services 통합을 설정하세요.

메트릭 수집

AWS 람다 메트릭

  1. AWS 통합 페이지에서 LambdaMetric Collection 탭에서 활성화되어 있는지 확인하세요.

  2. Datadog IAM 정책에 다음 권한을 추가하여 AWS 람다 메트릭을 수집하세요. 자세한 정보는 AWS 웹사이트에서 람다 정책을 참조하세요.

    AWS 권한설명
    lambda:List*람다 함수, 메타데이터 및 태그를 목록화합니다.
    tag:GetResources람다 함수에 적용되는 커스텀 태그를 받습니다.
    cloudtrail:LookupEventsCloudTrail 기록을 사용하여 람다 함수에 대한 변경 사항을 탐지합니다.
  3. Datadog - AWS 람다 함수를 설치합니다.

완료되면 Datadog 서버리스 보기에서 람다 함수 전체를 봅니다. 이 페이지는 서버리스 애플리케이션이 실행되는 AWS 람다 함수에서 메트릭, 트레이스 및 로그를 수집해 단일 보기로 제공합니다. 이 기능에 대한 상세한 설명서를 Datadog 서버리스 설명서에서 찾아볼 수 있습니다.

수집한 데이터

AWS 람다 확장명을 사용하면 AWS에서 보고하는 기간 메트릭은 람다 함수가 소비하는 post_runtime_extensions_duration 보고하여 함수 반응을 반환한 뒤 활동을 수행합니다. . 함수의 실제 성능을 모니터링하려면 duration - post_runtime_extensions_duration 또는 Datadog 개선 메트릭 aws.lambda.enhanced.runtime_duration을 사용하세요.

AWS에서 검색한 각 메트릭에는 AWS 콘솔에 표시하는 동일한 태그가 할당되어 있습니다. 함수 이름, 보안-그룹 등을 포함하나 이에 제한되지 않습니다.

메트릭

aws.lambda.async_event_age
(gauge)
Measures the average age of the difference between the time that an event is first enqueued in the internal queue and the time the Lambda service invokes the function.
Shown as millisecond
aws.lambda.async_event_age.maximum
(gauge)
Measures the maximum ageof the difference between the time that an event is first enqueued in the internal queue and the time the Lambda service invokes the function.
Shown as millisecond
aws.lambda.async_event_age.minimum
(gauge)
Measures the minimum age of the difference between the time that an event is first enqueued in the internal queue and the time the Lambda service invokes the function.
Shown as millisecond
aws.lambda.async_event_age.sum
(gauge)
Measures the sum of the ages of the differences between the time that an event is first enqueued in the internal queue and the time the Lambda service invokes the function.
Shown as millisecond
aws.lambda.async_events_dropped
(count)
Measures the number of events dropped without successfully executing the function.
Shown as event
aws.lambda.async_events_received
(count)
Measures the number of events that Lambda successfully queues for processing.
Shown as event
aws.lambda.concurrent_executions
(gauge)
Measures the average of concurrent executions for a given function at a given point in time.
Shown as execution
aws.lambda.concurrent_executions.maximum
(gauge)
Measures the maximum of concurrent executions for a given function at a given point in time.
Shown as execution
aws.lambda.concurrent_executions.minimum
(gauge)
Measures the minimum of concurrent executions for a given function at a given point in time.
Shown as execution
aws.lambda.concurrent_executions.sum
(gauge)
Measures the sum of concurrent executions for a given function at a given point in time.
Shown as execution
aws.lambda.concurrent_executions_global
(gauge)
Measures the average of concurrent executions for all functions in an account at a given point in time.
Shown as execution
aws.lambda.concurrent_executions_global.maximum
(gauge)
Measures the maximum of concurrent executions for all functions in an account at a given point in time.
Shown as execution
aws.lambda.concurrent_executions_global.minimum
(gauge)
Measures the minimum of concurrent executions for all functions in an account at a given point in time.
Shown as execution
aws.lambda.concurrent_executions_global.sum
(gauge)
Measures the sum of concurrent executions for all functions in an account at a given point in time.
Shown as execution
aws.lambda.dead_letter_errors
(count)
Measures the sum of times Lambda is unable to write the failed event payload to your configured Dead Letter Queues.
Shown as error
aws.lambda.duration
(gauge)
Measures the average elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing - including post_runtime_extensions_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as millisecond
aws.lambda.duration.maximum
(gauge)
Measures the maximum elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing - including post_runtime_extensions_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as millisecond
aws.lambda.duration.minimum
(gauge)
Measures the minimum elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing - including post_runtime_extensions_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as millisecond
aws.lambda.duration.p50
(gauge)
Measures the p50 elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing - including post_runtime_extensions_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as millisecond
aws.lambda.duration.p80
(gauge)
Measures the p80 elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing - including post_runtime_extensions_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as millisecond
aws.lambda.duration.p95
(gauge)
Measures the p95 elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing - including post_runtime_extensions_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as millisecond
aws.lambda.duration.p99
(gauge)
Measures the p99 elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing - including post_runtime_extensions_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as millisecond
aws.lambda.duration.p99.9
(gauge)
Measures the p99.9 elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing - including post_runtime_extensions_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as millisecond
aws.lambda.duration.sum
(gauge)
Measures the total execution time of the lambda function executing - including post_runtime_extensions_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as millisecond
aws.lambda.enhanced.billed_duration
(gauge)
Measures the billed amount of time the function ran for.
Shown as second
aws.lambda.enhanced.duration
(gauge)
Measures the elapsed seconds from when the function code starts executing as a result of an invocation to when it stops executing - including post_runtime_duration consumed by Lambda extensions performing activities after the function response is returned.
Shown as second
aws.lambda.enhanced.errors
(count)
Measures the number of invocations that failed due to errors in the function.
Shown as error
aws.lambda.enhanced.estimated_cost
(gauge)
Measures the total estimated cost of the function invocation (US dollars).
Shown as dollar
aws.lambda.enhanced.init_duration
(gauge)
Measures the initialization time (second) of a function during a cold start.
Shown as second
aws.lambda.enhanced.invocations
(count)
Measures the number of times a function is invoked in response to an event or invocation API call.
Shown as invocation
aws.lambda.enhanced.max_memory_used
(gauge)
Measures the maximum amount of memory (mb) used by the function.
Shown as mebibyte
aws.lambda.enhanced.memorysize
(gauge)
Measures the amount of allocated memory (mb) available to the function during execution.
Shown as mebibyte
aws.lambda.enhanced.out_of_memory
(count)
Measures the number of times a function runs out of memory.
Shown as error
aws.lambda.enhanced.post_runtime_duration
(gauge)
Measures the elapsed milliseconds from when the function returns the response to when the extensions finish performing activities like sending telemetry data to a preferred destination after the function’s response is returned.
Shown as millisecond
aws.lambda.enhanced.produced_bytes
(gauge)
Measures the number of bytes returned by a function.
Shown as byte
aws.lambda.enhanced.response_duration
(gauge)
Measures the elapsed time in milliseconds from when the first byte of response to the last byte of response is sent to the client.
Shown as millisecond
aws.lambda.enhanced.response_latency
(gauge)
Measures the elapsed time in milliseconds from when the invocation request is received to when the first byte of response is sent to the client.
Shown as millisecond
aws.lambda.enhanced.runtime_duration
(gauge)
Measures the elapsed milliseconds from when the function code starts to when it returns the response.
Shown as millisecond
aws.lambda.enhanced.time_to_first_byte
(gauge)
Measures the elapsed time in milliseconds from when the function code starts to when it returns the first byte.
Shown as millisecond
aws.lambda.enhanced.timeouts
(count)
Measures the number of times a function times out.
Shown as timeout
aws.lambda.errors
(count)
Measures the number of invocations that failed due to errors in the function.
Shown as error
aws.lambda.invocations
(count)
Measures the number of times a function is invoked in response to an event or invocation API call.
Shown as invocation
aws.lambda.iterator_age
(gauge)
Measures the age of the last record for each batch of records processed
Shown as millisecond
aws.lambda.iterator_age.maximum
(gauge)
Measures the maximum age of the last record for each batch of records processed
Shown as millisecond
aws.lambda.iterator_age.minimum
(gauge)
Measures the minimum age of the last record for each batch of records processed
Shown as millisecond
aws.lambda.iterator_age.sum
(gauge)
Measures the sum of the ages of the last record for each batch of records processed
Shown as millisecond
aws.lambda.memorysize
(gauge)
Measures the amount of allocated memory available to the function during execution.
Shown as mebibyte
aws.lambda.post_runtime_extensions_duration
(gauge)
Measures the average amount of time that the runtime spends running code for extensions after the function code has completed.
Shown as millisecond
aws.lambda.post_runtime_extensions_duration.maximum
(gauge)
Measures the maximum amount of time that the runtime spends running code for extensions after the function code has completed.
Shown as millisecond
aws.lambda.post_runtime_extensions_duration.minimum
(gauge)
Measures the minimum amount of time that the runtime spends running code for extensions after the function code has completed.
Shown as millisecond
aws.lambda.post_runtime_extensions_duration.p50
(gauge)
Measures the p50 elapsed wall time that the runtime spends running code for extensions after the function code has completed.
Shown as millisecond
aws.lambda.post_runtime_extensions_duration.p99
(gauge)
Measures the p90 elapsed wall time that the runtime spends running code for extensions after the function code has completed.
Shown as millisecond
aws.lambda.post_runtime_extensions_duration.sum
(gauge)
Measures the cumulative amount of time that the runtime spends running code for extensions after the function code has completed.
Shown as millisecond
aws.lambda.provisioned_concurrency_invocations
(count)
Measures the number of invocations that are run on provisioned concurrency
Shown as invocation
aws.lambda.provisioned_concurrency_spillover_invocations
(count)
Measures the number of invocations that are run on non-provisioned concurrency when all provisioned concurrency is in use
Shown as invocation
aws.lambda.provisioned_concurrency_utilization
(gauge)
Measures the average fraction of provisioned concurrency in use for a given function at a given point in time
Shown as percent
aws.lambda.provisioned_concurrency_utilization.maximum
(gauge)
Measures the maximum fraction of provisioned concurrency in use for a given function at a given point in time
Shown as percent
aws.lambda.provisioned_concurrency_utilization.minimum
(gauge)
Measures the minimum fraction of provisioned concurrency in use for a given function at a given point in time
Shown as percent
aws.lambda.provisioned_concurrent_executions
(gauge)
Measures the average number of events that are being processed on provisioned concurrency
Shown as execution
aws.lambda.provisioned_concurrent_executions.maximum
(gauge)
Measures the maximum number of events that are being processed on provisioned concurrency
Shown as execution
aws.lambda.provisioned_concurrent_executions.minimum
(gauge)
Measures the minimum number of events that are being processed on provisioned concurrency
Shown as execution
aws.lambda.signature_validation_errors
(count)
Measures the number of times a function is successfully deployed but fails a signature check
Shown as error
aws.lambda.streamed_outbound_bytes
(gauge)
Measures the number of outbound bytes returned by a streaming response function.
Shown as byte
aws.lambda.streamed_outbound_throughput
(rate)
Measures the number of bytes returned per second by a streaming response function.
Shown as byte
aws.lambda.throttles
(count)
Measures the number of Lambda function invocation attempts that were throttled due to invocation rates exceeding the customer's concurrent limits (error code 429). Failed invocations may trigger a retry attempt that succeeds.
Shown as throttle
aws.lambda.timeout
(gauge)
Measures the amount of allowed execution time for the function before the Lambda runtime stops it.
Shown as second
aws.lambda.unreserved_concurrent_executions
(gauge)
Measures the sum of the concurrency of the functions that don't have a custom concurrency limit specified.
Shown as execution
aws.lambda.url_4xx_count
(count)
The number of requests that returned a 4xx HTTP status code.
Shown as error
aws.lambda.url_5xx_count
(count)
The number of requests that returned a 5xx HTTP status code.
Shown as error
aws.lambda.url_latency
(gauge)
The time between when a request was received by the Function URL and when it receives a response from the function
Shown as millisecond
aws.lambda.url_latency.maximum
(gauge)
The maximum time between when a request was received by the Function URL and when it receives a response from the function
Shown as millisecond
aws.lambda.url_latency.minimum
(gauge)
The minimum time between when a request was received by the Function URL and when it receives a response from the function
Shown as millisecond
aws.lambda.url_latency.p50
(gauge)
The 50th percentile time between when a request was received by the Function URL and when it receives a response from the function
Shown as millisecond
aws.lambda.url_latency.p99
(gauge)
The 99th percentile time between when a request was received by the Function URL and when it receives a response from the function
Shown as millisecond
aws.lambda.url_request_count
(count)
The number of requests hit this Function URL.
Shown as request

이벤트

AWS 람다 함수는 [Datadog 서버리스 배포 추적9이 활성화된 경우 AWS CloudTrail에서 람다 배포 이벤트를 수집합니다.

서비스 검사

AWS 람다 함수에는 서비스 점검이 포함되어 있지 않습니다.

실시간으로 향상된 Lambda 메트릭

서버리스 설명서를 참조하여 자세히 알아보세요.

커스텀 메트릭

자세한 정보는 서버리스 설명서를 참조하세요.

로그 수집

자세한 정보는 서버리스 설명서를 참조하세요.

트레이스 수집

자세한 정보는 서버리스 설명서를 참조하세요.

Lambda@Edge

Datadog는 람다 메트릭에서 자동으로 at_edge, edge_master_nameedge_master_arn 태그를 추가하여 Edge 위치에서 실행될 때 람다 함수 메트릭 및 로그의 집계 상태를 볼 수 있도록 해줍니다.

배포 트레이싱은 Lambda@Edge 함수에 대해 지원되지 않습니다.

즉시 사용 가능한 모니터링

AWS 람다 통합은 즉시 사용 가능한 모니터링 기능을 제공해 성능을 모니터링하고 최적화할 수 있도록 지원합니다.

  • AWS 람다 대시보드: 즉시 사용 가능한 AWS 람다 대시보드를 사용해 람다 함수에 대한 종합적인 개요를 확보합니다.
  • 권장 모니터: 권장 AWS 람다 모니터를 활성화해 선제적으로 문제를 탐지하고 적시에 알림을 받습니다.

트러블슈팅

도움이 필요하신가요? Datadog 지원팀에 문의해 주세요.

참고 자료