-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pagination support for Sentry endpoints #77
Add pagination support for Sentry endpoints #77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @olegpixel, these changes LGTM! Just one question in the comments
…github.com/Canva/grafana-sentry-datasource into olegyevik-sentry-datasource-select-project
…github.com/Canva/grafana-sentry-datasource into olegyevik-sentry-datasource-select-project
Hey @olegpixel, the build is failing because of an unknown word |
Hi @aangelisc, I've updated |
Perfect, thanks again for the contribution @olegpixel! |
Overview
This PR introduces pagination support for Projects endpoint, enhancing the ability to retrieve data from Sentry's API efficiently.
Sentry Projects Endpoint - https://docs.sentry.io/api/organizations/list-an-organizations-projects/
Sentry Pagination Docs - https://docs.sentry.io/api/pagination/
Link Header - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link
Changes Made
Added a new FetchWithPagination method in the SentryClient to parse the Link header and extract the next page URL when available, aligning the code with Sentry's pagination guidelines.
Added a new GetAllProjects function to utilise the enhanced Fetch method, enabling it to fetch all projects across multiple pages as needed.
This change will address and resolve the issue described here - #31