Skip to content

fix: return stable cursor tokens in GetLogEvents to fix SDK paginatio…#184

Open
hectorvent wants to merge 1 commit intomainfrom
fix/cloudwatch-logs-get-log-events-pagination-90
Open

fix: return stable cursor tokens in GetLogEvents to fix SDK paginatio…#184
hectorvent wants to merge 1 commit intomainfrom
fix/cloudwatch-logs-get-log-events-pagination-90

Conversation

@hectorvent
Copy link
Copy Markdown
Owner

@hectorvent hectorvent commented Apr 3, 2026

…n loop (#90)

Summary

Type of change

  • Bug fix (fix:)
  • New feature (feat:)
  • Breaking change (feat!: or fix!:)
  • Docs / chore

AWS Compatibility

Checklist

  • ./mvnw test passes locally
  • New or updated integration test added
  • Commit messages follow Conventional Commits

Details

  • GetLogEvents was generating random UUID tokens on every call, causing SDK paginators to loop infinitely (they stop only when returnedToken == sentToken)
  • Replaced random tokens with cursor-based tokens (f/<index>, b/<index>) encoding the event position in the sorted stream
  • End-of-stream is signaled naturally: when the cursor is past the last event, the same token is returned — matching the SDK paginator's stop condition

Close #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] CloudWatch Logs: GetLogEvents does not return request token at end of stream

1 participant