|
@@ -4,21 +4,21 @@
|
|
|
# import prometheus_client
|
|
|
from . import app
|
|
|
from typing import Iterable
|
|
|
-# from prometheus_client import Counter, Gauge, Histogram, Summary, start_http_server, generate_latest
|
|
|
+from prometheus_client import Counter, Gauge, Histogram, Summary
|
|
|
# from prometheus_client.core import CollectorRegistry
|
|
|
from prometheus_flask_exporter import PrometheusMetrics
|
|
|
|
|
|
metrics = PrometheusMetrics(app)
|
|
|
|
|
|
|
|
|
-def counter(name: str, documentation: str, labels=None):
|
|
|
- return metrics.counter(name, documentation, labels)
|
|
|
+def counter(name, description, labels=None, initial_value_when_only_static_labels=True, **kwargs):
|
|
|
+ return metrics.counter(name, description, labels, initial_value_when_only_static_labels, **kwargs)
|
|
|
|
|
|
-def gauge(name: str, documentation: str, labels=None):
|
|
|
- return metrics.gauge(name, documentation, labels)
|
|
|
+def gauge(name, description, labels=None, initial_value_when_only_static_labels=True, **kwargs):
|
|
|
+ return metrics.gauge(name, description, labels, initial_value_when_only_static_labels, **kwargs)
|
|
|
|
|
|
-def histogram(name: str, documentation: str, labels=None):
|
|
|
- return metrics.histogram(name, documentation, labels)
|
|
|
+def histogram(name, description, labels=None, initial_value_when_only_static_labels=True, **kwargs):
|
|
|
+ return metrics.histogram(name, description, labels, initial_value_when_only_static_labels, **kwargs)
|
|
|
|
|
|
-def summary(name: str, documentation: str, labels=None):
|
|
|
- return metrics.summary(name, documentation, labels)
|
|
|
+def summary(name, description, labels=None, initial_value_when_only_static_labels=True, **kwargs):
|
|
|
+ return metrics.summary(name, description, labels, initial_value_when_only_static_labels, **kwargs)
|