10000 Update Collector type in README.md (#963) · draftcode/client_python@249490e · GitHub
[go: up one dir, main page]

Skip to content

Commit 249490e

Browse files
authored
Update Collector type in README.md (prometheus#963)
Signed-off-by: Marek Czaplicki <mdczaplicki@gmail.com>
1 parent 2ff5328 commit 249490e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,9 @@ To do so you need to create a custom collector, for example:
604604

605605
```python
606606
from prometheus_client.core import GaugeMetricFamily, CounterMetricFamily, REGISTRY
607+
from prometheus_client.registry import Collector
607608

608-
class CustomCollector(object):
609+
class CustomCollector(Collector):
609610
def collect(self):
610611
yield GaugeMetricFamily('my_gauge', 'Help text', value=7)
611612
c = CounterMetricFamily('my_counter_total', 'Help text', labels=['foo'])

0 commit comments

Comments
 (0)
0