From 7f9717fe9ee90b2f9f63c4247147ccd5da4248db Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Thu, 25 May 2023 15:17:42 -0400 Subject: [PATCH] update logging for slack interactive_api_endpoint (#2022) # What this PR does In trying to solve https://github.com/grafana/oncall-private/issues/1836, it is very difficult to understand the root cause without seeing the event payload. This PR will log this out. ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated (N/A) - [ ] Documentation added (or `pr:no public docs` PR label added if not required) (N/A) - [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) (N/A) --- engine/apps/slack/views.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/engine/apps/slack/views.py b/engine/apps/slack/views.py index 21097f1b..09be7229 100644 --- a/engine/apps/slack/views.py +++ b/engine/apps/slack/views.py @@ -152,14 +152,7 @@ class SlackEventApiEndpointView(APIView): if isinstance(payload, str): payload = json.JSONDecoder().decode(payload) - logger.info( - "team_id: %s channel_id: %s user_id: %s command: %s event: %s", - payload.get("team_id"), - payload.get("channel_id"), - payload.get("user_id"), - payload.get("command"), - payload.get("event", {}).get("type"), - ) + logger.debug(f"Slack payload is {payload}") # Checking if it's repeated Slack request if "HTTP_X_SLACK_RETRY_NUM" in request.META and int(request.META["HTTP_X_SLACK_RETRY_NUM"]) > 1: