Skip to content

Commit

Permalink
JSON Convert Values for prometheus collector
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvind2222 committed Apr 7, 2022
1 parent f81381c commit 8f853af
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"""

import collections
import json
import logging
import re
from itertools import chain
Expand Down Expand Up @@ -157,7 +158,7 @@ def _translate_to_prometheus(
label_keys = []
for key, value in metric.attributes.items():
label_keys.append(self._sanitize(key))
label_values.append(str(value))
label_values.append(json.dumps(value, default=str))

metric_name = ""
if self._prefix != "":
Expand Down

0 comments on commit 8f853af

Please sign in to comment.