API Gateway Tracing¶
Level: Warning
Initial version: 0.1.3
cfn-lint: WS2002
tflint (REST): aws_apigateway_stage_tracing_rule
tflint (HTTP): Not supported
Amazon API Gateway can emit traces to AWS X-Ray, which enable visualizing service maps for faster troubleshooting.
AWS SAM templates
For AWS::Serverless::Api resources, this rule checks the effective TracingEnabled property, including values inherited from Globals.Api. HTTP APIs (AWS::Serverless::HttpApi and implicit HttpApi events) do not support X-Ray tracing and are not checked. For AWS::Serverless::Api and AWS::Serverless::HttpApi resources, this rule checks the effective stage settings directly, including values inherited from Globals.Api or Globals.HttpApi. Function Api events without RestApiId and HttpApi events without ApiId create implicit APIs, which are also checked using the applicable global settings; each implicit API finding is reported once per owning function, so functions sharing an implicit API can each receive a finding.
Implementations for REST APIs¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
1 2 3 4 5 6 7 8 9 | |
1 2 3 4 5 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
Implementations for HTTP APIs¶
Remark: HTTP APIs do not support tracing at the moment.
Why is this a warning?¶
You might use third party solutions for monitoring serverless applications. If this is the case, enabling tracing for API Gateway might be optional. Refer to the documentation of your monitoring solutions to see if you should enable AWS X-Ray tracing or not.