Skip to content

Commit e28a732

Browse files
authored
🔧 chore(aci): logs to check if we are correctly invoking the activity notification handler (#95735)
1 parent b6c5e78 commit e28a732

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/sentry/issues/status_change_consumer.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,26 +151,32 @@ def update_status(group: Group, status_change: StatusChangeMessageData) -> None:
151151
152152
This is used to trigger the `workflow_engine` processing status changes.
153153
"""
154-
logger.info(
155-
"group.update_status.activity_type",
156-
extra={**log_extra, "activity_type": activity_type.value, "group_id": group.id},
157-
)
158154
latest_activity = (
159155
Activity.objects.filter(group_id=group.id, type=activity_type.value)
160156
.order_by("-datetime")
161157
.first()
162158
)
163-
logger.info(
164-
"group.update_status.latest_activity",
165-
extra={**log_extra, "latest_activity": latest_activity, "group_id": group.id},
166-
)
167159
if latest_activity is not None:
168160
metrics.incr(
169161
"workflow_engine.issue_platform.status_change_handler",
170162
amount=len(group_status_update_registry.registrations.keys()),
171163
tags={"activity_type": activity_type.value},
172164
)
165+
logger.info(
166+
"group.status_change.activity_created",
167+
extra={
168+
"group_id": group.id,
169+
"activity_type": activity_type,
170+
},
171+
)
173172
for handler in group_status_update_registry.registrations.values():
173+
logger.info(
174+
"group.status_change.activity_created.handler",
175+
extra={
176+
"group_id": group.id,
177+
"activity_type": activity_type,
178+
},
179+
)
174180
handler(group, status_change, latest_activity)
175181

176182

0 commit comments

Comments
 (0)