简体   繁体   中英

PHP - AWS CloudWatch Logs return tooNewLogEventsStartIndex

I'm using AWS PHP SDK in order to allow clients application to send batch of Log Events to my central log @ AWS CloudWatch Logs.

Using the PutLogEvents() method i'm pushing a batch of logs to AWS and receive the following response with tooNewLogEventStartIndex as rejected reason.

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

I couldn't find any documentation @ AWS explaining what this error means.. Does someone knows?

Apparently this error means that the timestamp on the log event is to far in the future. I did a mistake in my code and multiply my timestamp in 1000 (to microseconds) which was too much and made the timestamp in valid.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM