node-sentry-api icon indicating copy to clipboard operation
node-sentry-api copied to clipboard

add support for pagination

Open jbellenger opened this issue 10 years ago • 6 comments

Implement api pagination. The semantics are:

  • if any single page request fails, reject the entire request
  • callbacks passed to Client.request will be called once the merged result
  • requests for each page are logged

Because this is potentially a breaking change, bump the version to 0.1.0. Also change host.com to test.com, per rfc2606: reserved top level DNS names

Fixes #1

jbellenger avatar Feb 11 '16 19:02 jbellenger

Ping.

jbellenger avatar Mar 04 '16 18:03 jbellenger

EEK! Sorry, missed this completely, will look ASAP.

pifantastic avatar Mar 04 '16 19:03 pifantastic

No problem! I appreciate it.

jbellenger avatar Mar 04 '16 19:03 jbellenger

Thanks for the PR!

Looks like I've also had pagination code lying around uncommitted for awhile. Just pushed that up if you're interested in taking a look: https://github.com/pifantastic/node-sentry-api/tree/pagination

I like your change, but I'm worried about automatically loading all pages, as it could be potentially large. For example, I have projects that receive tens of thousands of events an hour. My solution was to return a cursor for each request, so the caller could decide to make subsequent requests if they need to.

I think a combination of our approaches might be desirable?

pifantastic avatar Mar 04 '16 19:03 pifantastic

Or maybe we just add a limit param and adjust your code to stop at limit results?

pifantastic avatar Mar 04 '16 19:03 pifantastic

Note that this repo is being forked to https://github.com/taskcluster/node-sentry-api. If you'd like to see this functionality merged, we'll be happy to consider a PR, but my guess is that this has bitrotted in the last four years..

djmitche avatar Jul 24 '20 12:07 djmitche