Description
Active X-Ray tracing on an API Gateway REST API stage helps analyze request latency and backend calls. When tracing is disabled and no alternative observability is available, investigations may lack useful context.
Potential impact
Identifying the failing component or cause of latency may take longer.
Remediation
Set tracing_enabled: true when X-Ray tracing is needed, then verify trace collection and sampling for the stage.
Examples
The examples compare tasks with tracing disabled or omitted against an enabled task. Supply the Swagger file and API identifiers for the target environment.
Before
yaml
- name: Deploy API Gateway
community.aws.aws_api_gateway:
swagger_file: my_api.yml
stage: production
cache_enabled: true
cache_size: "1.6"
tracing_enabled: false
endpoint_type: EDGE
state: present
- name: Deploy API Gateway changes
community.aws.aws_api_gateway:
api_id: "abc123321cba"
swagger_file: my_api.yml
deploy_desc: Make auth fix available.
cache_enabled: true
cache_size: "1.6"
endpoint_type: EDGE
state: present
After
yaml
- name: Deploy API Gateway
community.aws.aws_api_gateway:
swagger_file: my_api.yml
stage: production
cache_enabled: true
cache_size: "1.6"
tracing_enabled: true
endpoint_type: EDGE
state: present