Repository navigation
fix(eap-items): Only use indexed_name for ranges after it was populated - #8496
Merged
Merged
Conversation
Requests whose start_timestamp is at or after eap_items_indexed_name_start_timestamp (default 2026-09-25 00:00 UTC) now read the bloom-filter-indexed indexed_name column for sentry.op / sentry.metric_name equality and IN filters, regardless of the per-org allowlist. Older ranges still require the org to be listed, since rows written before the column was fully populated would otherwise be dropped.
phacops
marked this pull request as ready for review
September 25, 2026 22:30
The indexed_name rewrite now requires both the org allowlist and a request range starting at or after eap_items_indexed_name_start_timestamp. The cutoff default lives only in the schema; the code falls back to disabling the rewrite if the option can't be read.
pbhandari
approved these changes
Sep 25, 2026
pbhandari
left a comment
Contributor
There was a problem hiding this comment.
I'm fine with this as is; but ideally we accept a datetime as a string so the options-automator config is readable without us needing to parse the timestamp into a datetime.
Without a fallback, get_option relies on the schema default and raises on read errors instead of silently using a value from code. The indexed_name cutoff now reads the option this way, so its only default is the schema's.
…name cutoff Reverts the optional get_option fallback. The cutoff read falls back to 0 if the option can't be read; the schema default still applies normally.
Falling back to 0 made every time range eligible for the indexed_name rewrite if the option read failed, which could silently drop rows written before indexed_name was populated. Fall back to a cutoff no request can reach instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
indexed_namerewrite now only applies to requests whose time range starts afterindexed_namewas fully populated. Orgs ineap_items_use_indexed_name_organization_idsstill read the bloom-filter-indexed column for equality andINfilters onsentry.op(spans) andsentry.metric_name(metrics). Now that also requires the request'sstart_timestampto be at or after the neweap_items_indexed_name_start_timestampoption. Older ranges keep theattributes_stringlookup.Without the cutoff, an enabled org querying older data silently loses rows. Rows written before the column was populated have an empty
indexed_name, and until #8488 metrics filled it from the wrong attribute.The schema default is 2026-09-23 00:00 UTC: the first midnight after #8488 merged (2026-09-22 14:43 UTC) plus an hour of padding. That is not a verified deploy time across regions. If any region deployed #8488 later, raise the option to the midnight after that deploy before enabling orgs there. The code passes
0as theget_optionfallback. That value is only used if the option can't be read, and the cutoff is only read after the org check passes.The org list's schema description now also names the correct metric attribute,
sentry.metric_name.