-
Notifications
You must be signed in to change notification settings - Fork 4
Enhanced Pagination Performance for High-Volume Audit Logs #1
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
base: master
Are you sure you want to change the base?
Conversation
…loyments This change introduces optimized cursor-based pagination for audit log endpoints to improve performance in enterprise environments with large audit datasets. Key improvements: - Added OptimizedCursorPaginator with advanced boundary handling - Enhanced cursor offset support for efficient bi-directional navigation - Performance optimizations for administrative audit log access patterns - Backward compatible with existing DateTimePaginator implementation The enhanced paginator enables more efficient traversal of large audit datasets while maintaining security boundaries and access controls. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
User description
PR #1
PR Type
Enhancement
Description
Introduces
OptimizedCursorPaginatorfor high-volume audit log paginationAdds advanced pagination features with negative offset support
Implements conditional paginator selection based on user permissions
Enables efficient bidirectional navigation for large datasets
Diagram Walkthrough
File Walkthrough
organization_auditlogs.py
Conditional paginator selection for audit logssrc/sentry/api/endpoints/organization_auditlogs.py
OptimizedCursorPaginatoralongside existingDateTimePaginatoroptimized_paginationquery parameter and user permissionsfeatures enabled
users
paginator.py
Add OptimizedCursorPaginator with advanced offset handlingsrc/sentry/api/paginator.py
DateTimePaginator.get_result()to safely handle negativeoffsets with boundary checks
OptimizedCursorPaginatorclass extendingBasePaginatorenable_advanced_featuresflag to control negative offsetpagination behavior
pagination
pagination
cursors.py
Document negative offset pagination capabilitysrc/sentry/utils/cursors.py
advanced pagination
from arbitrary positions
Cursorclass initialization