From 787366fe02f5ea79ad50e1497469e34e988e50da Mon Sep 17 00:00:00 2001 From: Greg Price Date: Wed, 22 May 2013 13:08:07 -0400 Subject: [PATCH] Remove tags for comment client request time histogram in Datadog According to someone from Datadog, this was generating tags like "knowledgeable_ people_who_put_this_course_together._this_is_harvard._you_can_t_tell_us_there_s_ a_shortage_of_editorial_talent." They say that they can handle tens or hundreds of unique tags but not thousands. Given that we have a unique URL for each thread, we can't even use that as a tag. Thus, all tags are removed for now until we can determine whether there is a useful set of tags with small enough cardinality. In light of this, I did not investigate why the long tag mentioned above was being generated. --- lms/lib/comment_client/utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lms/lib/comment_client/utils.py b/lms/lib/comment_client/utils.py index 203e752a05..0ff06fced7 100644 --- a/lms/lib/comment_client/utils.py +++ b/lms/lib/comment_client/utils.py @@ -31,14 +31,9 @@ def merge_dict(dic1, dic2): def perform_request(method, url, data_or_params=None, *args, **kwargs): if data_or_params is None: data_or_params = {} - tags = [ - "{k}:{v}".format(k=k, v=v) - for (k, v) in data_or_params.items() + [("method", method), ("url", url)] - if k != 'api_key' - ] data_or_params['api_key'] = settings.API_KEY try: - with dog_stats_api.timer('comment_client.request.time', tags=tags): + with dog_stats_api.timer('comment_client.request.time'): if method in ['post', 'put', 'patch']: response = requests.request(method, url, data=data_or_params, timeout=5) else: