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 2020/10/14 00:22:50 UTC

[GitHub] [incubator-superset] graceguo-supercat commented on a change in pull request #11222: refactor: add log_with_context to event_logger

graceguo-supercat commented on a change in pull request #11222:
URL: https://github.com/apache/incubator-superset/pull/11222#discussion_r504330465



##########
File path: superset/views/core.py
##########
@@ -1645,19 +1645,16 @@ def dashboard(  # pylint: disable=too-many-locals
             request.args.get(utils.ReservedUrlParameters.EDIT_MODE.value) == "true"
         )
 
-        # Hack to log the dashboard_id properly, even when getting a slug
-        @event_logger.log_this
-        def dashboard(**_: Any) -> None:
-            pass
-
-        dashboard(
+        event_logger.log_with_context(

Review comment:
       i found this only logs a very short time, can we log the duration of the whole `dashboard` method?




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



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