问题排查 - Amazon CloudWatch
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

问题排查

以下是 OTLP 端点的常见问题排查场景和解决方案。

问题 描述 解决方案

启动 OCB 收集器时 Amazon 凭证不存在

收集器启动时抛出以下错误。

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.

输入正确的凭证。

Amazon 凭证无效

当通过 OTLP 端点发送请求时,收集器抛出 HTTP Status Code 403, Message=The security token included in the request is invalid., Details=[]“。

刷新收集器服务器上的 Amazon 凭证。

交易搜索已禁用

收集器抛出 Message=The OTLP API is supported with CloudWatch Logs as a Trace Segment Destination。

在使用 OTLP 端点进行跟踪之前,请确保在 CloudWatch 中启用 Transaction Search。有关更多信息,请参阅 Transaction Search
批处理和超时问题

收集器会抛出以下问题之一:

  • 最大经过时间已过期,未能发出 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

使用批处理器调整批处理和超时策略。
重试问题

收集器和 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 确保发送到跟踪端点的有效载荷在限制内。有关更多信息,请参阅 端点限额和限制