From b8dc7928c56f7d75cd501677c82006bd19deb6e0 Mon Sep 17 00:00:00 2001 From: Wan Lei Date: Wed, 20 Mar 2019 21:47:05 +0800 Subject: [PATCH 1/4] add --- .idea/client_python.iml | 11 ++ .idea/encodings.xml | 4 + .idea/misc.xml | 7 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .idea/workspace.xml | 306 +++++++++++++++++++++++++++++++++++ prometheus_client/metrics.py | 3 + 7 files changed, 345 insertions(+) create mode 100644 .idea/client_python.iml create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/client_python.iml b/.idea/client_python.iml new file mode 100644 index 00000000..67116063 --- /dev/null +++ b/.idea/client_python.iml @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 00000000..15a15b21 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..dc541717 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..85e482c4 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..94a25f7f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..2a894a2e --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + times + timestamp + now + type_suffixes + registry + MetricWrapperBase + generate_latest + register + REGISTRY + CollectorRegistry + Count + colle + _auto_describe + no token foun + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - 1551249537847 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From f6dd651a2bb54d067750644ce3acdd4d08e0a0b7 Mon Sep 17 00:00:00 2001 From: Wan Lei Date: Wed, 20 Mar 2019 22:15:14 +0800 Subject: [PATCH 4/4] debug remove --- prometheus_client/metrics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prometheus_client/metrics.py b/prometheus_client/metrics.py index 6dfd785d..12454d74 100644 --- a/prometheus_client/metrics.py +++ b/prometheus_client/metrics.py @@ -167,7 +167,8 @@ def remove(self, *labelvalues): labelvalues = tuple(unicode(l) for l in labelvalues) if labelvalues not in self._metrics: - raise ValueError('The label value tuple not exists') + print('The label value tuple not exists') + return with self._lock: print(labelvalues) print(self._metrics)