API Gateway X-Ray 추적 비활성화

API 요청 추적을 운영 요구에 맞게 활성화하세요.

설명

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

참조