MCPcopy Create free account
hub / github.com/prometheus/client_python / custom_collector

Method custom_collector

tests/test_core.py:949–954  ·  view source on GitHub ↗
(self, metric_family, registry)

Source from the content-addressed store, hash-verified

947 Gauge('s_count', 'help', registry=registry)
948
949 def custom_collector(self, metric_family, registry):
950 class CustomCollector:
951 def collect(self):
952 return [metric_family]
953
954 registry.register(CustomCollector())
955
956 def test_autodescribe_disabled_by_default(self):
957 registry = CollectorRegistry()

Calls 2

CustomCollectorClass · 0.70
registerMethod · 0.45

Tested by

no test coverage detected