Skip to content

Commit 696c889

Browse files
authored
feat(metric-stats): Add cardinality.{limit,scope} tags to strings indexer (#68891)
Adds `cardinality.scope` and `cardinality.limit` tags to strings indexer, to allow manual queries via cardinality analyzer spanning multiple/all orgs with a fixed metric id/tag id. The tag is unused in all indexer tables.
1 parent 30702c6 commit 696c889

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/sentry/sentry_metrics/indexer/strings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@
198198
"outcome.id": PREFIX + 276,
199199
"outcome.reason": PREFIX + 277,
200200
"cardinality.window": PREFIX + 278,
201+
"cardinality.limit": PREFIX + 279,
202+
"cardinality.scope": PREFIX + 280,
201203
# GENERAL/MISC (don't have a category)
202204
"": PREFIX + 1000,
203205
}

tests/sentry/sentry_metrics/test_prevent_modifications_to_indexer_strings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from hashlib import sha256
22

33
LOCKED_FILE = "src/sentry/sentry_metrics/indexer/strings.py"
4-
LOCKED_DIGEST = "609a019a93229c352ec38c2be6a0620bfd2964e00315258c32f1502b4bc14add"
4+
LOCKED_DIGEST = "890c15103cfd9315583cfd72e4488a310e67e0c5acaddae7780cebb6e586dc70"
55
MESSAGE = f"""{LOCKED_FILE} is locked.
66
77
* We have detected you made changes to this file.

0 commit comments

Comments
 (0)