Repository navigation
feat(attributes): return last seen, cardinality, and Relay-modified counts in attribute details - #130528
Merged
JoshuaKGoldberg merged 8 commits intoNov 25, 2026
Conversation
JoshuaKGoldberg
marked this pull request as ready for review
November 10, 2026 14:59
JoshuaKGoldberg
force-pushed
the
joshgoldberg/exp-1453-return-last-seen-from-the-attribute
branch
from
November 10, 2026 20:41
001793d to
9746482
Compare
Contributor
Sentry Snapshot Testing
|
JoshuaKGoldberg
force-pushed
the
joshgoldberg/exp-1453-return-last-seen-from-the-attribute
branch
from
November 10, 2026 21:02
9746482 to
1bc6198
Compare
Base automatically changed from
joshgoldberg/exp-1452-show-units-on-attribute-details
to
master
November 11, 2026 14:13
nikkikapadia
approved these changes
Nov 23, 2026
nikkikapadia
left a comment
Member
There was a problem hiding this comment.
lgtm! one question but i also think it's worth getting @mjq eyes on this because i don't know too much about how these things are stored in EAP and such
| rows = [attribute for attribute in response.attributes if attribute.name == ref.name] | ||
| if not rows: | ||
| if len(response.attributes) >= limit: | ||
| return _query_last_seen_from_table(dataset, refs, resolver) |
Member
There was a problem hiding this comment.
more out of curiosity, how's the table query different from the RPC query?
Member
Author
There was a problem hiding this comment.
As I understand it (😬), they're two different Snuba queries:
- The names RPC reads the co-occurring attributes rollup, which keeps a
last_seenper weekly bucket. So it's cheap. - The table query scans the actual spans/logs/metrics for the newest one that has the attribute, which is exact but way more expensive.
Member
There was a problem hiding this comment.
ah ok gotcha! so we do the cheap query and if we don't find anything we do the more expensive query. Makes sense to me 😌
…ails endpoint Co-Authored-By: Claude <noreply@anthropic.com>
…s by type Co-Authored-By: Claude <noreply@anthropic.com>
…attribute details endpoint Co-Authored-By: Claude <noreply@anthropic.com>
…d number meta keys Co-Authored-By: Claude <noreply@anthropic.com>
JoshuaKGoldberg
marked this pull request as draft
November 24, 2026 17:35
Stats now resolve each listed attribute key the way search does, plus the legacy names that the temporary alias mappings still list, instead of collecting stored names through a side channel while serializing the attribute list. The query module moves to sentry.search.eap. Cardinality runs on the resolved key, so an alias stored under two names now gets one. Refs EXP-1453
JoshuaKGoldberg
force-pushed
the
joshgoldberg/exp-1453-return-last-seen-from-the-attribute
branch
from
November 24, 2026 17:54
c399905 to
ef3476c
Compare
…53-return-last-seen-from-the-attribute
JoshuaKGoldberg
marked this pull request as ready for review
November 25, 2026 19:08
JoshuaKGoldberg
deleted the
joshgoldberg/exp-1453-return-last-seen-from-the-attribute
branch
November 25, 2026 19:33
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.
The attribute details endpoint now returns per-dataset stats for the attribute: when it was last seen, its approximate cardinality, and for spans, how many stored spans had its value modified by Relay. Stats come back null when they can't be computed: when a query fails, when the attribute is computed rather than stored, or for cardinality of boolean and array attributes.
Closes EXP-1453. Closes EXP-1456.