Repository navigation
chore(attributes): Add deprecated sentry.device.* attributes - #804
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Bug Fixes 🐛
Internal Changes 🔧Attributes
🤖 This preview updates automatically when you update the PR. |
alexander-alderman-webb
force-pushed
the
webb/sentry-device
branch
from
November 16, 2026 09:38
cda69e0 to
886c9a2
Compare
alexander-alderman-webb
force-pushed
the
webb/sentry-device
branch
from
November 16, 2026 10:51
886c9a2 to
f92fa79
Compare
alexander-alderman-webb
marked this pull request as ready for review
November 16, 2026 10:51
alexander-alderman-webb
requested review from
a team,
Lms24,
andreiborza,
cleptric,
giortzisg,
mjq and
nsdeschenes
as code owners
November 16, 2026 10:51
cleptric
approved these changes
Nov 16, 2026
andreiborza
approved these changes
Nov 17, 2026
4 tasks done
MeredithAnya
pushed a commit
to getsentry/snuba
that referenced
this pull request
Nov 24, 2026
Re-lands the sentry-conventions 0.35.0 bump (#8737, reverted in f8209206b) together with the fix for the regression it caused. **What broke** 0.35.0 adds `sentry.device.class` as an alias of `device.class` (getsentry/sentry-conventions#804), so snuba now reads `device.class` as a coalesced value: ``` multiIf(has(mapKeys(attributes_string), 'device.class'), attributes_string['device.class'], attributes_string['sentry.device.class']) ``` Sentry sends `device.class` as a virtual column mapped from `sentry.device.class`. `_apply_virtual_columns` transforms expressions bottom-up and only rewrites reads keyed by `to_column_name`. So the value map landed inside one branch of the `multiIf`, and the fallback branch returned the raw `sentry.device.class` value, or NULL when neither key is set. Spans without a device class stopped resolving to `Unknown` in sentry's spans queries, which broke sentry's backend tests and blocked backend deploys. **Fix** A virtual column replaces every read of its name. Before applying the value map, `_apply_virtual_columns` now collapses coalesced reads of `to_column_name` back to a single-key read. This covers the SELECT/group-by form (`attributes_string[...]`), the filter form (`arrayElement`), and the OR'd `has(mapKeys(...))` existence guard. It matches the exact expressions built by `coalesced_attribute_names`, `first_present_value`, and `key_existence_conditions`. Coalescing of the backing `from_column_name` is unchanged. **Rollout note** Merging puts 0.35.0 back into the `snuba:nightly` image that sentry's backend CI uses, so the sentry test job here needs to be green before this merges. <!-- junior-request-attribution:start --> via @ElioDiNino. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0BU5E23PJA%3A1795228837.231619 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0BU5E23PJA%3A1795228837.231619) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0BU5E23PJA%3A1795228837.231619/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Elio Di Nino <[email protected]>
This branch was successfully deployed
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.
Documents attributes queries in
sentrybased onhttps://github.com/getsentry/sentry/blob/master/src/sentry/search/eap/spans/attributes.py
Contributes to #803