설명
REST API 스테이지에서 X-Ray 활성 추적을 켜면 샘플링된 요청이 어느 구간에서 오래 걸리는지 확인할 수 있습니다.
잠재적 영향
수동 추적에서도 앞단 서비스가 추적을 시작한 요청은 X-Ray에 나타날 수 있습니다.
해결 방법
대상 스테이지에 tracing_enabled: true를 설정하세요. 요청을 보낸 뒤 X-Ray에 해당 스테이지의 샘플 추적이 표시되는지 확인하세요.
예시
production 작업은 my_api.yml을 읽습니다. 기존 API를 업데이트할 때는 해당 API ID를 지정하세요. 예시의 community.aws.aws_api_gateway는 community.aws.api_gateway의 별칭입니다.
변경 전
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