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?

preguntada hace 4 años1127 visualizaciones
1 Respuesta
0
Respuesta aceptada

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
respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas