Skip to content

Commit 06cd926

Browse files
authored
fix(detectors): Handle case where repeating_spans_compact is a list (#101222)
`repeating_spans_compact` can be a list, not just a string. if it is, we should just take the first span and use that.
1 parent efb7304 commit 06cd926

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sentry/notifications/utils/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ def get_performance_issue_alert_subtitle(event: GroupEvent) -> str:
336336
"""Generate the issue alert subtitle for performance issues"""
337337
if event.occurrence is None:
338338
return ""
339-
return event.occurrence.evidence_data.get("repeating_spans_compact", "").replace("`", '"')
339+
repeating_spans_compact = event.occurrence.evidence_data.get("repeating_spans_compact", "")
340+
if isinstance(repeating_spans_compact, list):
341+
repeating_spans_compact = repeating_spans_compact[0]
342+
return repeating_spans_compact.replace("`", '"')
340343

341344

342345
def get_notification_group_title(

0 commit comments

Comments
 (0)