문제 해결 - Amazon CloudWatch

문제 해결

다음은 OTLP 엔드포인트에 대한 일반적인 문제 해결 시나리오 및 솔루션입니다.

문제 설명 Solution

OCB 수집기를 시작할 때 AWS 자격 증명이 존재하지 않음

시작 시 수집기에서 다음과 같은 오류가 발생합니다.

Error: invalid configuration: extensions::sigv4auth: could not retrieve credential provider: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded.

올바른 자격 증명을 입력합니다.

유효하지 않은 AWS 자격 증명

수집기에서 HTTP 상태 코드 403 발생, Message=The security token included in the request is invalid., Details=[]“ when sending requests though OTLP endpoint.

수집기 서버의 AWS 자격 증명을 새로 고침합니다.

트랜잭션 검색 비활성화됨

수집기에서 오류 발생 Message=The OTLP API is supported with CloudWatch Logs as a Trace Segment Destination.

트레이스에 OTLP 엔드포인트를 사용하기 전에 CloudWatch에서 트랜잭션 검색이 활성화되어 있는지 확인합니다. 자세한 내용은 트랜잭션 검색 섹션을 참조하세요.
배치 및 제한 시간 문제

수집기에서 다음 문제 중 하나가 발생합니다.

  • 최대 경과 시간이 만료되어 HTTP 요청에 실패했습니다.

  • io.opentelemetry.exporter.internal.http.HttpExporter - 스팬을 내보내지 못했습니다. 요청을 실행할 수 없습니다. 전체 오류 메시지: 제한 시간

  • io.opentelemetry.exporter.internal.grpc.GrpcExporter - 스팬을 내보내지 못했습니다. 서버가 gRPC 상태 코드 2로 응답했습니다. 오류 메시지: 제한 시간

  • rpc error: code = DeadlineExceeded desc = context deadline exceeded

  • rpc error: code = ResourceExhausted desc = Too many requests", "dropped_items": 1024

batchprocessor를 사용하여 배치 및 제한 시간 정책을 조정합니다.
재시도 문제

수집기와 OTLP 엔드포인트 간의 일시적인 네트워크 문제입니다.

  • rpc error: code = Unavailable desc = error reading from server: read tcp

  • rpc error: code = Unavailable desc = unexpected HTTP status code received from server: 502 (Bad Gateway);

  • rpc error: code = Unavailable desc = unexpected HTTP status code received from server: 503 (Service Unavailable)

내보내기 도구를 사용하여 재시도 정책을 조정합니다.
페이로드 거부됨 NA 트레이스 엔드포인트로 전송된 페이로드가 한도 및 제한 사항 내에 있는지 확인합니다. 자세한 내용은 엔드포인트 제한 및 제약 조건 섹션을 참조하세요.
ADOT에서 발신 내보내기 요청에 인증 헤더가 주입되지 않음

일반 403 오류, '인증 토큰 누락':

예시:

ERROR:opentelemetry.exporter.otlp.proto.http.trace_exporter:Failed to export batch code: 403, reason: Missing Authentication Token

CloudWatch 로그 그룹에 로그 또는 스팬이 나타나지 않음 예상되는 CloudWatch 로그 그룹에 로그 또는 스팬이 표시되지 않습니다(스팬의 경우 aws/spans, 로그의 경우 지정된 사용자 지정 로그 그룹). 계측할 라이브러리가 자동 계측을 통해 지원되는지 확인합니다. Java, Python, JavaScript.NET에 대해 지원되는 라이브러리를 참조하세요.