How do you track initialization metrics for a Lambda function?

0

We configured provisioned concurrency for our Java Lambda function to reduce its startup time. Part of the function's startup time is the Java code initializing itself though, which isn't reduced by provisioned concurrency.

We'd like to know how long it takes for our code to initialize before it starts processing a request, so we can assess if it's worth the time and effort to optimize. I created a test system with a Java Lambda function, and activated AWS X-Ray with Active tracing, but I don't see a breakdown for initialization, invocation, and overhead.

What's the best way to track initialization metrics for a Lambda function?

질문됨 4년 전1127회 조회
1개 답변
0
수락된 답변

When you turn on active tracing in AWS X-Ray, a trace automatically records information on the following subsegments of requests processed by the Lambda service that involve a cold start: Initialization, Invocation, and Overhead. If you're not seeing these subsegments in an AWS X-Ray trace, the request was likely made on a warmed instance.

For information on how to improve your Java Lambda function's performance, see How do I reduce initialization and invocation duration latency for my Java Lambda function?

AWS
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠