在运行 Docker 容器的 Lambda 上运行 AWS XRay 守护程序。

huangapple go评论80阅读模式
英文:

Running AWS XRay deamon on a lambda running docker container

问题

我正在使用Docker运行.NET应用程序的Lambda函数。事实上,我有两个Lambda函数,一个基于Docker镜像,另一个打包为zip文件。在配置Xray时,基于zip打包的那个Lambda函数工作正常,并正常跟踪,但基于Docker镜像的Lambda函数不会将任何流量发送到Xray。
我现在得出的结论是,我应该在运行我的应用程序的容器上运行XRay守护程序,这正确吗?到目前为止,我还没有找到关于这种设置的任何文档或示例。

英文:

I am running a lambda function with docker for a .NET application. in fact I have two lambdas, one based on a docker image and the other one is packaged as a zip. while configuring Xray with both functions, the one that is Zip packaged works fine and being traced normally, but the lambda running based on a docker image does not send any traffic to Xray.
I have concluded now that I should run the XRay Deamon on the same container where my app is running, is that correct ? I have so far not found any documentation or example for this setup

答案1

得分: 0

请添加标签 aws-lambda 并删除 aws-xray 以吸引 AWS Lambda 的注意。Lambda 图像机制可能与普通 Lambda 不同,需要 AWS Lambda 开发人员解答 XRay 在 Lambda 图像中的工作方式。

英文:

Please add tag aws-lambda and remove aws-xray for attracting AWS Lambda attention. The Lambda image mechanism might be different than the normal Lambda, need AWS Lambda developer answer how XRay works in Lambda image.

答案2

得分: 0

我已经找到了解决方案。默认情况下,Xray守护程序也在Lambda容器内运行。但是,如果你在分布式模式下在StepFunction中运行Lambda,根据AWS文档,不会发送任何数据。这是一个非常特殊的用例,无论守护程序是否运行都无关紧要,Lambda容器将不会向Xray API发出任何跟踪信息。
现在我正在考虑要么以另一种模式(内联模式)运行Lambda与StepFunctions,要么简单地使用另一个库(来自OpenTelemetry)。

英文:

I have managed to find the solution. the xray daemon runs by default inside the lambda container as well. but if you run lambda inside a stepfunction in a distributed mode, no data will be sent according to AWS documentation. This was a very special use case where it does not matter if the daemon is running or not, lambda container will simply not be emitting any tracing information to the xray API.
I am considering now either running the lambda with stepfunctions in another mode (inline mode), or simply use another librariy (from the opentelemetry)

huangapple
  • 本文由 发表于 2023年6月9日 02:27:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/76434728.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定