1
0
Fork 0

Compare commits

..

No commits in common. "trunk" and "v0.0.1" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -1,2 +1,2 @@
Flask==2.1.2
requests==2.27.1
requests==2.24.0
Flask==1.1.2

View File

@ -21,7 +21,7 @@ def json_to_prom(json, prefix, instance):
prefix = prefix + "_" + v.index(item)
if type(item) is bool:
outlines += '{}_{}{{instance="{}"}} {}\n'.format(prefix, k, instance, 1 if item else 0)
if type(item) in [int, float]:
if type(item) in [int, str]:
outlines += '{}_{}{{instance="{}"}} {}\n'.format(prefix, k, instance,item)
if type(item) is dict:
outlines += json_to_prom(item, "{}_{}".format(prefix, k), instance)