Skip to content

Commit

Permalink
Merge pull request #508 from TeskaLabs/fix/influx-metrics
Browse files Browse the repository at this point in the history
Metrics: Removing help and unit from tags in influx
  • Loading branch information
eliska-n authored Oct 17, 2023
2 parents 399a834 + 5c24ca2 commit 0a9ec09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asab/metrics/influxdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def combine_tags_and_field(tags, values, timestamp):
tags = escape_tags(tags)
values = escape_values(values)
# Then combine the tags and then values
tags_string = ",".join(["{}={}".format(tk, tv) for tk, tv in tags.items()])
tags_string = ",".join(["{}={}".format(tk, tv) for tk, tv in tags.items() if tk not in ("help", "unit")]) # remove "help" and "unit" tags -> utilized in openmetric target
field_set = ",".join([get_field(value_name, value) for value_name, value in values.items()])
return tags_string + " " + field_set + " " + str(int(timestamp * 1e9))

Expand Down

0 comments on commit 0a9ec09

Please sign in to comment.