Skip to content

Paging from CloudWatch Stymies Library #863

@SethO

Description

@SethO

v4.0.6

I'm seeing paging results from the CloudWatch toHaveLog() matcher. Using default time of one hour. Here's an example of a cloudWatchLogs.filterLogEvents() return with a nextToken:

{
  events: [
    {
      logStreamName: '2023/10/31/[$LATEST]3998d19732dc45e4a031419cc461562d',
      timestamp: 1698716448251,
      message: '[this is not the message you are looking for]\n',
      ingestionTime: 1698716449742,
      eventId: '37882642676998482009100965194064775797471706186071408642'
    }
  ],
  searchedLogStreams: [
    
  ],
  nextToken: 'Bxkq6kVGFtq2y_MoigeqscPOdhXVbhiVtLoAmXb5jCrGNG3oJwptg8VF1zEUyfwpBFOEV9qaY_2ur816UYZk3Iv-_OKdTpV0sOjuuuo6lhHo6MAkaWO_XYl_s_a8JomVJlQ5mnH80rmZdtJHEP5zFJLyv-cyetGGKGsMHIpqCaNSJ94TSv_-4ALOA_AxbxH5uBu73PEjdGmaFPD6HKVXYA_u7kNYArLsZglRQIPdnBZD_4npKJ5sPWHQlKud3w4BDbTfNfLmTSOh_0apMGhYRA'
}

This happens on a log group with a 24-hour retention. I just need to run my test a couple of times to put a few logs in there and I can generate a nextToken almost at will.

FWIW, I can drop the version back to v1.1.6 and I get no error. Same log group. I have no idea what's changed, but will update here if I find anything suspicious.

-Seth

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions