Skip to content

Commit 22a444f

Browse files
authored
🔧 chore: change slack service activity notif to debug level (#93188)
1 parent 0c0d0e2 commit 22a444f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/sentry/integrations/slack/service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def notify_all_threads_for_activity(self, activity: Activity) -> None:
141141
}
142142

143143
if activity.group is None:
144-
self._logger.info(
144+
self._logger.debug(
145145
"no group associated on the activity, nothing to do",
146146
extra=log_params,
147147
)
@@ -156,7 +156,8 @@ def notify_all_threads_for_activity(self, activity: Activity) -> None:
156156
)
157157

158158
if activity.user_id is None and not uptime_resolved_notification:
159-
self._logger.info(
159+
# This is a machine/system update, so we don't need to send a notification
160+
self._logger.debug(
160161
"machine/system updates are ignored at this time, nothing to do",
161162
extra=log_params,
162163
)

tests/sentry/integrations/slack/service/test_slack_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def test_none_group(self):
128128

129129
with mock.patch.object(self.service, "_logger") as mock_logger:
130130
self.service.notify_all_threads_for_activity(activity=self.activity)
131-
mock_logger.info.assert_called_with(
131+
mock_logger.debug.assert_called_with(
132132
"no group associated on the activity, nothing to do",
133133
extra={
134134
"activity_id": self.activity.id,
@@ -141,7 +141,7 @@ def test_none_user_id(self):
141141

142142
with mock.patch.object(self.service, "_logger") as mock_logger:
143143
self.service.notify_all_threads_for_activity(activity=self.activity)
144-
mock_logger.info.assert_called_with(
144+
mock_logger.debug.assert_called_with(
145145
"machine/system updates are ignored at this time, nothing to do",
146146
extra={
147147
"activity_id": self.activity.id,

0 commit comments

Comments
 (0)