Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/client_python
/ collect
Method
collect
tests/test_core.py:739–740 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
737
def
custom_collector(self, metric_family):
738
class
CustomCollector:
739
def
collect(self):
740
return
[metric_family]
741
742
self.registry.register(CustomCollector())
743
Callers
9
test_counter_exemplars_oneline
Method · 0.45
test_counter_exemplars_add
Method · 0.45
test_restricted_registry
Method · 0.45
test_restricted_registry_adds_new_metrics
Method · 0.45
test_target_info_restricted_registry
Method · 0.45
test_restricted_registry_does_not_call_extra
Method · 0.45
test_restricted_registry_ignore_no_names_collectors
Method · 0.45
test_restricted_registry_collects_no_names_collectors
Method · 0.45
test_restricted_registry_does_not_yield_while_locked
Method · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected