MCPcopy Index your code
hub / github.com/prometheus/client_python / CustomCollector

Class CustomCollector

tools/simple_client.py:11–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10
11class CustomCollector:
12 def collect(self):
13 g = GaugeMetricFamily('my.random.utf8.metric', 'Random value', labels=['label.1'])
14 g.add_metric(['value.1'], random.random())
15 g.add_metric(['value.2'], random.random())
16 yield g
17
18
19app = FastAPI()

Callers 1

simple_client.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected