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.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user