openmeter
openmeter copied to clipboard
Add cursor pagination to internal streaming API
Relates to Issue #1527
Overview
Adds cursor based pagination to the internal streaming API. Unfortunately this requires a change in the main events table, we'd have to change the ordering in the table definition for reasonable query performance (id is used as the tie-breaker which previously wasn't present in the index)
Notes for reviewer
- Its currently unclear how to expose this through the external API, should we do a V2 API for this, etc... I'd treat that as a separate effort, this is just the ground-work for that.
- To emphasize again, changing the table ordering is a significant issue, we need to measure the impact