diff --git a/c2cwsgiutils/scripts/stats_db.py b/c2cwsgiutils/scripts/stats_db.py index dae1dade6..56d2a6b49 100755 --- a/c2cwsgiutils/scripts/stats_db.py +++ b/c2cwsgiutils/scripts/stats_db.py @@ -82,13 +82,11 @@ def get_gauge(self, kind: str, kind_help: str, labels: List[str]) -> Gauge: return self.gauges[kind] def do_report( - self, metric: List[str], value: int, kind: str, kind_help: str, tags: Optional[Dict[str, str]] = None + self, metric: List[str], value: int, kind: str, kind_help: str, tags: Dict[str, str] ) -> None: LOG.debug("%s.%s -> %d", kind, ".".join(metric), value) - if value > 0: # Don't export 0 values. We can always set null=0 in grafana... - tags = {**(tags or {}), **stats.get_env_tags()} - gauge = self.get_gauge(kind, kind_help, list(tags.keys())) - gauge.labels(**tags).set(value) + gauge = self.get_gauge(kind, kind_help, list(tags.keys())) + gauge.labels(**tags).set(value) def commit(self) -> None: if self.prometheus_push: