Skip to content

Commit 90cc14f

Browse files
authored
chore(logs): Remove high cardinality arroyo log message (#97721)
This was creating very high cardinality attribute names.
1 parent 56e19c9 commit 90cc14f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/sentry/utils/sdk.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,13 @@ def before_send(event: Event, hint: Hint) -> Event | None:
269269

270270

271271
def before_send_log(log: Log, _: Hint) -> Log | None:
272+
attributes = log.get("attributes")
273+
if attributes is not None:
274+
# This is a coming from arroyo and creating high cardinality of attribute names like
275+
# `Partition(topic=Topic(name='...'), index=...)`
276+
if attributes.get("sentry.message.template") == "New partitions assigned: %r":
277+
return None
278+
272279
if in_random_rollout("ourlogs.sentry-emit-rollout"):
273280
return log
274281
return None

0 commit comments

Comments
 (0)