如何在 X-Ray 服务地图中链接 lambda 函数调用
How to chain lambda function calls in X-Ray service map
我想在 xray 服务映射中链接两个 lambda 函数调用,以可视化函数调用之间的连接并获得总体执行时间。
我的 lambda 函数被步进函数调用。
启用主动跟踪时,我在服务地图中看到了各个功能,但它们之间没有联系。
_X_AMZN_TRACE_ID: Contains the tracing header, which includes the sampling decision, trace ID, and parent segment ID. (To learn more
about these properties, see Tracing Header.) If Lambda receives a
tracing header when your function is invoked, that header will be used
to populate the _X_AMZN_TRACE_ID environment variable. If a tracing
header was not received, Lambda will generate one for you.
https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
_X_AMZN_TRACE_ID好像包含相关信息。我的问题是,如何使用它在两个 lambda 函数调用(由步骤函数调用)之间建立连接?
尚不支持 Step Functions X-Ray 跟踪上下文传播,因此如果 Step Functions 调用 lambda 函数,则无法将它们链接在一起。我们正在开发此功能,但目前没有预计到达时间。
X-Ray 集成已添加到 AWS Step Function:
https://aws.amazon.com/blogs/compute/introducing-aws-x-ray-new-integration-with-aws-step-functions/
您可以在创建新状态机时启用 X-Ray 跟踪,方法是在“指定详细信息”页面上选择“启用 X-Ray 跟踪”。
如果状态机在启用 X-Ray 的情况下从上层服务获得调用,状态机将自动继续跟踪。
对于状态机中的所有任务状态,子段将被添加到跟踪中。
我想在 xray 服务映射中链接两个 lambda 函数调用,以可视化函数调用之间的连接并获得总体执行时间。 我的 lambda 函数被步进函数调用。 启用主动跟踪时,我在服务地图中看到了各个功能,但它们之间没有联系。
_X_AMZN_TRACE_ID: Contains the tracing header, which includes the sampling decision, trace ID, and parent segment ID. (To learn more about these properties, see Tracing Header.) If Lambda receives a tracing header when your function is invoked, that header will be used to populate the _X_AMZN_TRACE_ID environment variable. If a tracing header was not received, Lambda will generate one for you.
https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
_X_AMZN_TRACE_ID好像包含相关信息。我的问题是,如何使用它在两个 lambda 函数调用(由步骤函数调用)之间建立连接?
尚不支持 Step Functions X-Ray 跟踪上下文传播,因此如果 Step Functions 调用 lambda 函数,则无法将它们链接在一起。我们正在开发此功能,但目前没有预计到达时间。
X-Ray 集成已添加到 AWS Step Function: https://aws.amazon.com/blogs/compute/introducing-aws-x-ray-new-integration-with-aws-step-functions/
您可以在创建新状态机时启用 X-Ray 跟踪,方法是在“指定详细信息”页面上选择“启用 X-Ray 跟踪”。 如果状态机在启用 X-Ray 的情况下从上层服务获得调用,状态机将自动继续跟踪。 对于状态机中的所有任务状态,子段将被添加到跟踪中。