diff --git a/cameleer-server-app/src/main/java/com/cameleer/server/app/alerting/metrics/AlertingMetrics.java b/cameleer-server-app/src/main/java/com/cameleer/server/app/alerting/metrics/AlertingMetrics.java index 3da431bb..1b3f3f48 100644 --- a/cameleer-server-app/src/main/java/com/cameleer/server/app/alerting/metrics/AlertingMetrics.java +++ b/cameleer-server-app/src/main/java/com/cameleer/server/app/alerting/metrics/AlertingMetrics.java @@ -9,6 +9,7 @@ import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.Timer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Component; @@ -74,6 +75,7 @@ public class AlertingMetrics { * Production constructor: wraps the Postgres-backed gauge suppliers in a * 30-second TTL cache so Prometheus scrapes don't cause per-scrape DB queries. */ + @Autowired public AlertingMetrics(MeterRegistry registry, JdbcTemplate jdbc) { this(registry, () -> countRules(jdbc, true),