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)
This commit is contained in:
Joey Orlando 2023-05-25 15:17:42 -04:00 committed by GitHub
parent 15ef692009
commit 7f9717fe9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: