feat(upsampling) - Support upsampled error count with performance optimizations#3
feat(upsampling) - Support upsampled error count with performance optimizations#3ShashankFC wants to merge 2 commits into
Conversation
…(#94376) Part of the Error Upsampling project: https://www.notion.so/sentry/Tech-Spec-Error-Up-Sampling-1e58b10e4b5d80af855cf3b992f75894?source=copy_link Events-stats API will now check if all projects in the query are allowlisted for upsampling, and convert the count query to a sum over `sample_weight` in Snuba, this is done by defining a new SnQL function `upsampled_count()`. I noticed there are also eps() and epm() functions in use in this endpoint. I considered (and even worked on) also supporting swapping eps() and epm() which for correctness should probably also not count naively and use `sample_weight`, but this caused some complications and since they are only in use by specific dashboard widgets and not available in discover I decided to defer changing them until we realize it is needed.
- Add 60-second cache for upsampling eligibility checks to improve performance - Separate upsampling eligibility check from query transformation for better optimization - Remove unnecessary null checks in upsampled_count() function per schema requirements - Add cache invalidation utilities for configuration management This improves performance during high-traffic periods by avoiding repeated expensive allowlist lookups while maintaining data consistency.
|
Claude finished @ShashankFC's task in 7m 14s —— View job PR ReviewTodo List
OverviewThis PR implements error upsampling functionality for the events-stats API with performance optimizations including caching. The implementation allows Sentry to report upsampled error counts based on Critical Issues1. Race Condition in Cache Implementation
|
Test 3nn---nReplicated from ai-code-review-evaluation/sentry-greptile#3