-
Notifications
You must be signed in to change notification settings - Fork 2
Optimize spans buffer insertion with eviction during insert #2
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: performance-optimization-baseline
Are you sure you want to change the base?
Optimize spans buffer insertion with eviction during insert #2
Conversation
A proof of concept that limits the number of spans per segment during insertion. Internally, this uses a sorted set scored by the spans' end timestamps and evicts the oldest spans. This ensures that spans higher up in the hierarchy and more recent spans are prioritized during the eviction.
…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 #2
PR Type
Enhancement
Description
Optimize spans buffer with sorted set storage and eviction during insert
Add OptimizedCursorPaginator for high-volume audit log pagination
Enhance Span data model with precise end timestamp tracking
end_timestamp_precisefield to Span NamedTupleImprove pagination boundary handling for large datasets
Diagram Walkthrough
File Walkthrough
5 files
Add timestamp field and convert to sorted set storageImplement span eviction with sorted set operationsExtract and pass end_timestamp_precise to SpanAdd OptimizedCursorPaginator with advanced featuresIntegrate OptimizedCursorPaginator with feature flag1 files
Document negative offset support for pagination3 files
Update test spans with end_timestamp_precise fieldAdd end_timestamp_precise to test span payloadsInclude end_timestamp_precise in test span creation