Skip to content

chore(attributes): Add deprecated sentry.device.* attributes - #804

Merged
alexander-alderman-webb merged 2 commits into
mainfrom
webb/sentry-device
Nov 19, 2026
Merged

alexander-alderman-webb merged 2 commits into
mainfrom
webb/sentry-device

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-conventions Ready Ready Preview Nov 19, 2026 5:03pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add search alias types for unit-typed attributes by mjq with sentry-junior in #815
  • Add schema for chat-based gen_ai.output.messages values by alexander-alderman-webb in #810

Bug Fixes 🐛

  • (deps) Bump vitest and @sentry/astro to resolve Dependabot alerts by Lms24 and claude in #818

Internal Changes 🔧

Attributes

  • Add deprecated sentry.device.* attributes by alexander-alderman-webb in #804
  • Add deprecated sentry.runtime.name by alexander-alderman-webb in #806
  • Add deprecated sentry.thread.name by alexander-alderman-webb in #808
  • Add deprecated sentry.messaging.message.id by alexander-alderman-webb in #809
  • Add deprecated sentry.messaging.destination.name by alexander-alderman-webb in #796

🤖 This preview updates automatically when you update the PR.

@alexander-alderman-webb
alexander-alderman-webb merged commit ddc754b into main Nov 19, 2026
16 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/sentry-device branch November 19, 2026 17:10
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

1 active deployment
Preview — ade329fe Deployed Nov 19, 2026 by vercel[bot]
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.

3 participants