Skip to content

Commit 571c43c

Browse files
ref: add metric when canonical key falls back (#70385)
want to make sure this isn't happening before I clean up all of this -- I'm told this is handled by relay now <!-- Describe your PR here. -->
1 parent 602327f commit 571c43c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/sentry/utils/canonical.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@
4343

4444

4545
def get_canonical_name(key: str) -> str:
46-
return CANONICAL_KEY_MAPPING.get(key, (key,))[0]
46+
rv = CANONICAL_KEY_MAPPING.get(key)
47+
if rv is None:
48+
return key
49+
else:
50+
from sentry.utils import metrics
51+
52+
metrics.incr("canonical-legacy-key")
53+
return rv[0]
4754

4855

4956
class CanonicalKeyView(Mapping[str, V]):

0 commit comments

Comments
 (0)