Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/prometheus/client_python
/ CustomCollector
Class
CustomCollector
tests/test_exposition.py:36–38 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
34
35
def
custom_collector(self, metric_family):
36
class
CustomCollector:
37
def
collect(self):
38
return
[metric_family]
39
40
self.registry.register(CustomCollector())
41
Callers
2
custom_collector
Method · 0.70
custom_collector
Method · 0.70
Calls
no outgoing calls
Tested by
2
custom_collector
Method · 0.56
custom_collector
Method · 0.56