跟踪lambda的执行 [英] Tracking execution of lambda
问题描述
我有一个可以从各种帐户执行的lambda.我希望跟踪由不同帐户执行的lambda会执行多长时间. AWS X-ray给出了我无法执行的lambda无法将信息关联到lambda函数的调用者的持续时间.
I have a lambda that can be executed from various accounts. I wish to track how long the lambda executed for when executed by different accounts. AWS X-ray gives my the duration for which lambda executed by I can't corelate that information to the caller of the lambda function.
是否可以将lambda函数的执行持续时间与调用方链接到该函数?
Is there a way to link the duration of execution of lambda function to caller to the function?
推荐答案
如果您具有用于标识lambda函数上的帐户的参数,则可以使用AWS X射线的注释和元数据"功能.完成配置后,它将显示在您的X射线轨迹上.
If you have the parameter(s) to identify the accounts on your lambda function, you may use "Annotations and metadata" feature of aws x-ray. After you make configuration it is going to be shown on your x-ray traces.
由于您使用的是Java;您可以尝试示例代码
Since you are using java; you may try the example code
这篇关于跟踪lambda的执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!