Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS SAM X-Ray Tracing: Active vs PassThrough

What is the difference between Active and PassThrough in Tracing parameter of AWS::Serverless::Function?

Is PassThrough the default value?

like image 440
niqui Avatar asked Dec 02 '22 11:12

niqui


1 Answers

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.

The correct page would be the API documentation of AWS Lambda which does explain what the purpose of the TracingConfig is:

Mode

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.

Type: String

Valid Values: Active | PassThrough

Required: No

like image 142
Dunedan Avatar answered Dec 25 '22 10:12

Dunedan