説明
API GatewayのREST APIステージでX-Rayのアクティブトレースを使うと、リクエストの遅延やバックエンド呼び出しを分析できます。無効で代替の観測手段もない場合、調査に必要な情報が不足することがあります。
想定される影響
エラーの発生箇所や遅延の原因を特定するまでに時間がかかるおそれがあります。
対処方法
X-Rayトレースが必要な場合はtracing_enabled: trueを設定し、ステージのトレース収集とサンプリングを確認してください。
例
以下はトレースを無効にした、または省略したタスクと、有効にしたタスクの例です。SwaggerファイルとAPI識別子は対象環境に合わせて指定してください。
変更前
yaml
- name: 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: API Gatewayの変更をデプロイ
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
変更後
yaml
- name: 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