PHP - AWS CloudWatch 日志 return tooNewLogEventsStartIndex

PHP - AWS CloudWatch Logs return tooNewLogEventsStartIndex

我正在使用 AWS PHP SDK 以允许客户端应用程序将一批日志事件发送到我的中央日志 @ AWS CloudWatch Logs。

我使用 PutLogEvents() 方法将一批日志推送到 AWS 并收到以下响应,其中 tooNewLogEventStartIndex 作为拒绝原因。

object(Guzzle\Service\Resource\Model)#192 (2) {
  ["structure":protected]=>
  NULL
  ["data":protected]=>
  array(2) {
    ["nextSequenceToken"]=>
    string(56) "49557048644494214342955772042233869869420536807120962306"
    ["rejectedLogEventsInfo"]=>
    array(1) {
      ["tooNewLogEventStartIndex"]=>
      int(0)
    }
  }
}

我在 AWS 找不到任何文档来解释这个错误的含义。有人知道吗?

显然,此错误意味着日志事件的时间戳太晚了。 我在我的代码中犯了一个错误,将我的时间戳乘以 1000(微秒),这太多了,使时间戳有效。