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/12/04 08:49:46 UTC

[GitHub] [incubator-superset] ktmud commented on a change in pull request #11714: chore: improve analytics

ktmud commented on a change in pull request #11714:
URL: https://github.com/apache/incubator-superset/pull/11714#discussion_r535932486



##########
File path: superset/views/base_api.py
##########
@@ -312,49 +313,61 @@ def info_headless(self, **kwargs: Any) -> Response:
         """
         Add statsd metrics to builtin FAB _info endpoint
         """
-        duration, response = time_function(super().info_headless, **kwargs)
-        self.send_stats_metrics(response, self.info.__name__, duration)
-        return response
+        ref = f"{self.__class__.__name__}.info"
+        with log_context(ref, ref, log_to_statsd=False):

Review comment:
       @mistercrunch do you mind clarify why we added logs to these headless requests, as well? It seems all they does is sending statsd metrics. It doesn't make sense to me to keep a log in metadata db for when we send a log to statsd...

##########
File path: superset/views/base_api.py
##########
@@ -312,49 +313,61 @@ def info_headless(self, **kwargs: Any) -> Response:
         """
         Add statsd metrics to builtin FAB _info endpoint
         """
-        duration, response = time_function(super().info_headless, **kwargs)
-        self.send_stats_metrics(response, self.info.__name__, duration)
-        return response
+        ref = f"{self.__class__.__name__}.info"
+        with log_context(ref, ref, log_to_statsd=False):

Review comment:
       @mistercrunch do you mind clarifying why we added logs to these headless requests, as well? It seems all they does is sending statsd metrics. It doesn't make sense to me to keep a log in metadata db for when we send a log to statsd...




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