From 5c24ca28d6cc16cd5bc0bccc6129289b716c7790 Mon Sep 17 00:00:00 2001 From: eliska-n Date: Wed, 11 Oct 2023 22:44:02 +0200 Subject: [PATCH] removing help and unit from tags in influx --- asab/metrics/influxdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asab/metrics/influxdb.py b/asab/metrics/influxdb.py index c7f4c23e9..77c63698b 100644 --- a/asab/metrics/influxdb.py +++ b/asab/metrics/influxdb.py @@ -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))