You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/12/12 21:19:48 UTC

[GitHub] [incubator-superset] villebro commented on a change in pull request #8826: Add user agent logs

villebro commented on a change in pull request #8826: Add user agent logs
URL: https://github.com/apache/incubator-superset/pull/8826#discussion_r357375081
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -2739,9 +2751,10 @@ def _sql_json_sync(
     @expose("/sql_json/", methods=["POST"])
     @event_logger.log_this
     def sql_json(self):
-        return self.sql_json_exec(request.json)
+        log_params = {"USER_AGENT": cast(str, request.headers.get("USER_AGENT"))}
 
 Review comment:
   I assume `USER_AGENT` is always set in headers? If so, this could be changed to square brackets, otherwise probably good to cast to `Optional[str]`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org