Esempio n. 1
0
 def test_prometheus_client_not_installed(self, app, monkeypatch):
     monkeypatch.setattr("faust.sensors.prometheus.prometheus_client", None)
     with pytest.raises(ImproperlyConfigured):
         PrometheusMonitor(app)
Esempio n. 2
0
 def monitor(self, metrics: FaustMetrics) -> PrometheusMonitor:
     return PrometheusMonitor(metrics=metrics, time=_time)
Esempio n. 3
0
    def prometheus_client(self, app, counter, gauge, histogram, time=None):
        time = time or self.time()

        return PrometheusMonitor(app, time=time)