updating based on suggestions in 2911

This commit is contained in:
csine-nflx
2020-02-03 18:58:31 -08:00
parent fb6d369130
commit 53f81fb09f
4 changed files with 62 additions and 63 deletions

View File

@ -6,6 +6,7 @@ import dns.query
import dns.resolver
import re
from lemur.extensions import sentry
from lemur.extensions import metrics
@ -94,6 +95,7 @@ def get_dns_records(domain, rdtype, nameserver):
for record in rdata.strings:
records.append(record.decode("utf-8"))
except dns.exception.DNSException:
sentry.captureException()
function = sys._getframe().f_code.co_name
metrics.send(f"{function}.fail", "counter", 1)
return records