Skip to content

Commit

Permalink
Merge pull request #44 from jsmitchell/influx-strings
Browse files Browse the repository at this point in the history
Support double quoted strings per Influx line protocol
  • Loading branch information
omergertel authored Sep 24, 2017
2 parents de7bee8 + d25ebe6 commit 3acb18d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyformance/reporters/influx.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def report_now(self, registry=None, timestamp=None):
table = key
else:
table = "%s.%s" % (self.prefix, key)
values = ",".join(["%s=%s" % (k, v)
values = ",".join(["%s=%s" % (k, v if type(v) is not str \
else '"{}"'.format(v))
for (k, v) in metric_values.items()])
line = "%s %s %s" % (table, values, timestamp)
post_data.append(line)
Expand Down

0 comments on commit 3acb18d

Please sign in to comment.