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?

demandé il y a 4 ans1127 vues
1 réponse
0
Réponse acceptée

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
répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions