diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py index 460cfcb0eaa30..be523446a116f 100644 --- a/superset/dashboards/api.py +++ b/superset/dashboards/api.py @@ -285,13 +285,14 @@ def __repr__(self) -> str: @protect() @safe @statsd_metrics - @event_logger.log_this_with_context( - action=lambda self, *args, **kwargs: f"{self.__class__.__name__}.get", - log_to_statsd=False, - ) @with_dashboard - # pylint: disable=arguments-renamed, arguments-differ - def get(self, dash: Dashboard) -> Response: + @event_logger.log_this_with_extra_payload + # pylint: disable=arguments-differ + def get( + self, + dash: Dashboard, + add_extra_log_payload: Callable[..., None] = lambda **kwargs: None, + ) -> Response: """Gets a dashboard --- get: @@ -323,6 +324,9 @@ def get(self, dash: Dashboard) -> Response: $ref: '#/components/responses/404' """ result = self.dashboard_get_response_schema.dump(dash) + add_extra_log_payload( + dashboard_id=dash.id, action=f"{self.__class__.__name__}.get" + ) return self.response(200, result=result) @etag_cache(