Skip to content

Commit 4532453

Browse files
chore(np): More logs catDespair (#104553)
1 parent 7984f10 commit 4532453

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/sentry/notifications/platform/service.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,27 @@ def has_access(organization: Organization | RpcOrganization, source: str) -> boo
5353
options.get(option_key)
5454
except options.UnknownOption:
5555
logger.warning(
56-
"Notification platform key '%s' has not been registered in options/default.py",
57-
option_key,
56+
"notification.platform.has_access.unknown_option",
57+
extra={
58+
"organization_id": organization.id,
59+
"source": source,
60+
"option_key": option_key,
61+
},
5862
)
5963
return False
6064

61-
return sample_modulo(option_key, organization.id)
65+
modulo_result = sample_modulo(option_key, organization.id)
66+
logger.info(
67+
"notification.platform.has_access.sample_modulo",
68+
extra={
69+
"organization_id": organization.id,
70+
"source": source,
71+
"option_key": option_key,
72+
"modulo_result": modulo_result,
73+
"sample_rate": options.get(option_key),
74+
},
75+
)
76+
return modulo_result
6277

6378
def notify_target(self, *, target: NotificationTarget) -> None:
6479
"""

0 commit comments

Comments
 (0)