问题描述
AWS :: Serverless :: Function 的 Tracing
参数中的 Active
和 PassThrough
有什么区别??
What is the difference between Active
and PassThrough
in Tracing
parameter of AWS::Serverless::Function
?
PassThrough
是默认值吗?
推荐答案
AWS :: Serverless:Function
的 Tracing
参数的文档链接到说明如何使用AWS的页面使用AWS Lambda的X-Ray.不幸的是,该页面未声明任何有关完全是跟踪模式,所以它可能只是链接到错误的页面.
The documentation of the Tracing
parameter for AWS::Serverless:Function
links to a page explaining how to use AWS X-Ray with AWS Lambda. Unfortunately that page doesn't state anything about the tracing mode at all, so it's probably just linking to the wrong page.
正确的页面应该是AWS Lambda的API文档,它确实说明了 的目的是:
The correct page would be the API documentation of AWS Lambda which does explain what the purpose of the TracingConfig
is:
可以是PassThrough或Active.如果通过,Lambda只会跟踪来自上游服务的请求(如果它包含跟踪)标头为"sampled = 1".如果处于活动状态,则Lambda将遵守任何跟踪它从上游服务接收的标头.如果没有跟踪头收到后,Lambda将致电X-Ray进行追踪决定.
Can be either PassThrough or Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
类型:字符串
有效值:有效
| PassThrough
必填:否
这篇关于AWS SAM X射线跟踪:主动vs直通的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!