-
-
Notifications
You must be signed in to change notification settings - Fork 60
feat(attributes): add sampling to autocomplete #7267
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
Conversation
volokluev
commented
Jul 2, 2025
- We have a lot of timeouts on the autocomplete endpoint which uses the main tables to suggest attribute values. We can definitely sample these queries
- The TraceItemStats endpoint often times out (especially for large projects), so put in a special case to downgrade the storage tier for them automatically
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
onkar
left a comment
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.
LGTM overall, added a minor nit.
| def downgrade_tier(tier: Tier) -> Tier: | ||
| if tier == Tier.TIER_1: | ||
| return Tier.TIER_8 | ||
| elif tier == Tier.TIER_8: | ||
| return Tier.TIER_64 | ||
| elif tier == Tier.TIER_64: | ||
| return Tier.TIER_512 | ||
| return tier |
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.
Does it make sense to add a simple unit test to make sure this logic is guarded from future changes?
def test_downgrade_tier_behavior():
assert downgrade_tier(Tier.TIER_1) == Tier.TIER_8
assert downgrade_tier(Tier.TIER_8) == Tier.TIER_64
assert downgrade_tier(Tier.TIER_64) == Tier.TIER_512
assert downgrade_tier(Tier.TIER_512) == Tier.TIER_512
In order to merge getsentry/snuba#7267 we want to make sure that these tests don't break. These tests insert two items and get their data back. Not indicative of the usual workflow of things. Make them pass the `HIGHEST_ACCURACY` downsampling mode into the RPC in order to assure no sampling happens
In order to merge getsentry/snuba#7267 we want to make sure that these tests don't break. These tests insert two items and get their data back. Not indicative of the usual workflow of things. Make them pass the `HIGHEST_ACCURACY` downsampling mode into the RPC in order to assure no sampling happens