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?

gefragt vor 4 Jahren1127 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen