Skip to content

Commit

Permalink
Update Collector type in README.md (#963)
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Czaplicki <mdczaplicki@gmail.com>
  • Loading branch information
mdczaplicki committed Oct 11, 2023
1 parent 2ff5328 commit 249490e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -604,8 +604,9 @@ To do so you need to create a custom collector, for example:

```python
from prometheus_client.core import GaugeMetricFamily, CounterMetricFamily, REGISTRY
from prometheus_client.registry import Collector

class CustomCollector(object):
class CustomCollector(Collector):
def collect(self):
yield GaugeMetricFamily('my_gauge', 'Help text', value=7)
c = CounterMetricFamily('my_counter_total', 'Help text', labels=['foo'])
Expand Down

0 comments on commit 249490e

Please sign in to comment.