Skip to content

ref(storage-routing): make long term retention downsampling the default - #8235

Open
phacops wants to merge 1 commit into
masterfrom
pierre/modest-brown-768v7n
Open

ref(storage-routing): make long term retention downsampling the default#8235
phacops wants to merge 1 commit into
masterfrom
pierre/modest-brown-768v7n

Conversation

@phacops

@phacops phacops commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Removes the enable_long_term_retention_downsampling option and makes its behavior unconditional. In OutcomesBasedRoutingStrategy, EAP queries whose window starts more than 31 days ago are always routed to TIER_8, unless the item type is in ITEM_TYPE_FULL_RETENTION (uptime results and preprod, which keep their full-retention tier 1 data).

  • outcomes_based.py: drop the get_option gate and the now-unused import.
  • sentry-options/schemas/snuba/schema.json: drop the option definition.
  • tests: drop the override_options decorators that turned it on, and update test_outcomes_based_routing_queries_daily_table — its 100-day window now downsamples to TIER_8 rather than staying on TIER_1.

Note: if enable_long_term_retention_downsampling is still set in the deployed options, that entry becomes unknown once this schema change lands and should be cleaned up. The read path swallows OptionsError, so Snuba itself is unaffected.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.


Generated by Claude Code

Removes the `enable_long_term_retention_downsampling` option and makes its
behavior unconditional: in `OutcomesBasedRoutingStrategy`, EAP queries whose
window starts more than 31 days ago are always routed to TIER_8, unless the
item type is in `ITEM_TYPE_FULL_RETENTION` (uptime results and preprod, which
keep their full-retention tier 1 data).

- `outcomes_based.py`: drop the `get_option` gate (and the now-unused import).
- `sentry-options/schemas/snuba/schema.json`: drop the option definition.
- tests: drop the `override_options` decorators that turned it on, and update
  `test_outcomes_based_routing_queries_daily_table` — its 100-day window now
  downsamples to TIER_8 rather than staying on TIER_1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VTDth91JqESZnzKKRoFoKJ
@phacops
phacops requested review from a team as code owners July 29, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants