Merge pull request #979 from grafana/matiasb/slack-endpoint-extra-logging
Add additional logging info for slack API event endpoint requests
This commit is contained in:
commit
ad71fc3d61
1 changed files with 9 additions and 0 deletions
|
|
@ -143,6 +143,15 @@ 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"),
|
||||
)
|
||||
|
||||
# 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:
|
||||
logger.critical(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue