Description
Enable active X-Ray tracing on a REST API stage to see where sampled requests spend time.
Potential impact
With passive tracing, a request can still appear in X-Ray if an upstream service started the trace.
Remediation
Set tracing_enabled: true on the target stage. Send requests and check X-Ray for a sampled trace from that stage.
Examples
The production task reads my_api.yml. Supply your API ID when updating an existing API. The examples use community.aws.aws_api_gateway, an alias for community.aws.api_gateway.
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