gpt4 book ai didi

aws-lambda - AWS X 射线 : Is it possible to add the API Gateway call to the service map?

转载 作者:行者123 更新时间:2023-12-02 18:49:21 25 4
gpt4 key购买 nike

我已将 X 射线检测添加到我的 lambda(Node.js) 中,并且可以在跟踪中看到它周围的所有服务,但仍然无法将调用它的 API 网关添加到跟踪和服务映射中。有什么办法吗?

最佳答案

几天前AWS announced X-Ray 集成到 API Gateway 中的可用性,所以是的,现在可以全面了解包括 X-Ray 中的 API Gateway 在内的情况。

要在 API Gateway 中启用 X-Ray 集成,您可以使用管理控制台、AWS CLI 或直接进行 API 调用。

通过管理控制台打开您想要启用 X-Ray 集成的 API 的阶段,选择“日志/跟踪”选项卡,然后选择“启用 X-Ray 跟踪” ”,如下面的屏幕截图所示:

How to enable X-Ray integration into API Gateway using the Management console

要使用 AWS CLI 启用 X-Ray 集成,official documentation总结得很好:

To use the AWS CLI to enable active X-Ray tracing for an API that's already been deployed, call the update-stage command as follows:

aws apigateway update-stage          \
--rest-api-id {rest-api-id} \
--stage-name {stage-name} \
--patch-operations op=replace,path=/tracingEnabled,value=true

启用 X-Ray 与 API Gateway API Stage 的集成后,您将看到 API Gateway API Stage 显示在 X-Ray 服务 map 中。

关于aws-lambda - AWS X 射线 : Is it possible to add the API Gateway call to the service map?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47009336/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com