Skip to content

Commit

Permalink
datadog tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
thehesiod committed Oct 11, 2018
1 parent 4c87e9b commit e580708
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions upvote/gae/shared/common/monitoring.py
Expand Up @@ -29,8 +29,10 @@
def _dd_get_stats():
global _dd_stats

dd_api_instance = datadog_model.DataDogApiAuth.GetInstance()
dd_api_key = dd_api_instance.api_key if dd_api_instance is not None else None

if not _dd_stats:
dd_api_instance = datadog_model.DataDogApiAuth.GetInstance()
if not dd_api_instance:
return None

Expand All @@ -45,11 +47,11 @@ def _dd_get_stats():
def _dd_get_format(metric, fields):
stat_format = metric.metric_name
if not fields:
return stat_format
return str(stat_format)

for (field_name, field_type) in fields:
stat_format += u"." + field_name + u"%s"
return stat_format
stat_format += u"." + field_name + u".%s"
return str(stat_format)


def ContainExceptions(func):
Expand Down

0 comments on commit e580708

Please sign in to comment.